<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <title>WebXR Device API</title>
<style data-fill-with="stylesheet">/******************************************************************************
 *                   Style sheet for the W3C specifications                   *
 *
 * Special classes handled by this style sheet include:
 *
 * Indices
 *   - .toc for the Table of Contents (<ol class="toc">)
 *     + <span class="secno"> for the section numbers
 *   - #toc for the Table of Contents (<nav id="toc">)
 *   - ul.index for Indices (<a href="#ref">term</a><span>, in §N.M</span>)
 *   - table.index for Index Tables (e.g. for properties or elements)
 *
 * Structural Markup
 *   - table.data for general data tables
 *     -> use 'scope' attribute, <colgroup>, <thead>, and <tbody> for best results !
 *     -> use <table class='complex data'> for extra-complex tables
 *     -> use <td class='long'> for paragraph-length cell content
 *     -> use <td class='pre'> when manual line breaks/indentation would help readability
 *   - dl.switch for switch statements
 *   - ol.algorithm for algorithms (helps to visualize nesting)
 *   - .figure and .caption (HTML4) and figure and figcaption (HTML5)
 *     -> .sidefigure for right-floated figures
 *   - ins/del
 *
 * Code
 *   - pre and code
 *
 * Special Sections
 *   - .note       for informative notes             (div, p, span, aside, details)
 *   - .example    for informative examples          (div, p, pre, span)
 *   - .issue      for issues                        (div, p, span)
 *   - .assertion  for assertions                    (div, p, span)
 *   - .advisement for loud normative statements     (div, p, strong)
 *   - .annoying-warning for spec obsoletion notices (div, aside, details)
 *
 * Definition Boxes
 *   - pre.def   for WebIDL definitions
 *   - table.def for tables that define other entities (e.g. CSS properties)
 *   - dl.def    for definition lists that define other entitles (e.g. HTML elements)
 *
 * Numbering
 *   - .secno for section numbers in .toc and headings (<span class='secno'>3.2</span>)
 *   - .marker for source-inserted example/figure/issue numbers (<span class='marker'>Issue 4</span>)
 *   - ::before styled for CSS-generated issue/example/figure numbers:
 *     -> Documents wishing to use this only need to add
 *        figcaption::before,
 *        .caption::before { content: "Figure "  counter(figure) " ";  }
 *        .example::before { content: "Example " counter(example) " "; }
 *        .issue::before   { content: "Issue "   counter(issue) " ";   }
 *
 * Header Stuff (ignore, just don't conflict with these classes)
 *   - .head for the header
 *   - .copyright for the copyright
 *
 * Miscellaneous
 *   - .overlarge for things that should be as wide as possible, even if
 *     that overflows the body text area. This can be used on an item or
 *     on its container, depending on the effect desired.
 *     Note that this styling basically doesn't help at all when printing,
 *     since A4 paper isn't much wider than the max-width here.
 *     It's better to design things to fit into a narrower measure if possible.
 *   - js-added ToC jump links (see fixup.js)
 *
 ******************************************************************************/

/******************************************************************************/
/*                                   Body                                     */
/******************************************************************************/

	body {
		counter-reset: example figure issue;

		/* Layout */
		max-width: 50em;               /* limit line length to 50em for readability   */
		margin: 0 auto;                /* center text within page                     */
		padding: 1.6em 1.5em 2em 50px; /* assume 16px font size for downlevel clients */
		padding: 1.6em 1.5em 2em calc(26px + 1.5em); /* leave space for status flag     */

		/* Typography */
		line-height: 1.5;
		font-family: sans-serif;
		widows: 2;
		orphans: 2;
		word-wrap: break-word;
		overflow-wrap: break-word;
		hyphens: auto;

		/* Colors */
		color: black;
		background: white top left fixed no-repeat;
		background-size: 25px auto;
	}


/******************************************************************************/
/*                         Front Matter & Navigation                          */
/******************************************************************************/

/** Header ********************************************************************/

	div.head { margin-bottom: 1em }
	div.head hr { border-style: solid; }

	div.head h1 {
		font-weight: bold;
		margin: 0 0 .1em;
		font-size: 220%;
	}

	div.head h2 { margin-bottom: 1.5em;}

/** W3C Logo ******************************************************************/

	.head .logo {
		float: right;
		margin: 0.4rem 0 0.2rem .4rem;
	}

	.head img[src*="logos/W3C"] {
		display: block;
		border: solid #1a5e9a;
		border-width: .65rem .7rem .6rem;
		border-radius: .4rem;
		background: #1a5e9a;
		color: white;
		font-weight: bold;
	}

	.head a:hover > img[src*="logos/W3C"],
	.head a:focus > img[src*="logos/W3C"] {
		opacity: .8;
	}

	.head a:active > img[src*="logos/W3C"] {
		background: #c00;
		border-color: #c00;
	}

	/* see also additional rules in Link Styling section */

/** Copyright *****************************************************************/

	p.copyright,
	p.copyright small { font-size: small }

/** Back to Top / ToC Toggle **************************************************/

	@media print {
		#toc-nav {
			display: none;
		}
	}
	@media not print {
		#toc-nav {
			position: fixed;
			z-index: 2;
			bottom: 0; left: 0;
			margin: 0;
			min-width: 1.33em;
			border-top-right-radius: 2rem;
			box-shadow: 0 0 2px;
			font-size: 1.5em;
			color: black;
		}
		#toc-nav > a {
			display: block;
			white-space: nowrap;

			height: 1.33em;
			padding: .1em 0.3em;
			margin: 0;

			background: white;
			box-shadow: 0 0 2px;
			border: none;
			border-top-right-radius: 1.33em;
			background: white;
		}
		#toc-nav > #toc-jump {
			padding-bottom: 2em;
			margin-bottom: -1.9em;
		}

		#toc-nav > a:hover,
		#toc-nav > a:focus {
			background: #f8f8f8;
		}
		#toc-nav > a:not(:hover):not(:focus) {
			color: #707070;
		}

		/* statusbar gets in the way on keyboard focus; remove once browsers fix */
		#toc-nav > a[href="#toc"]:not(:hover):focus:last-child {
			padding-bottom: 1.5rem;
		}

		#toc-nav:not(:hover) > a:not(:focus) > span + span {
			/* Ideally this uses :focus-within on #toc-nav */
			display: none;
		}
		#toc-nav > a > span + span {
			padding-right: 0.2em;
		}

		#toc-toggle-inline {
			vertical-align: 0.05em;
			font-size: 80%;
			color: gray;
			color: hsla(203,20%,40%,.7);
			border-style: none;
			background: transparent;
			position: relative;
		}
		#toc-toggle-inline:hover:not(:active),
		#toc-toggle-inline:focus:not(:active) {
			text-shadow: 1px 1px silver;
			top: -1px;
			left: -1px;
		}

		#toc-nav :active {
			color: #C00;
		}
	}

/** ToC Sidebar ***************************************************************/

	/* Floating sidebar */
	@media screen {
		body.toc-sidebar #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			max-width: 80%;
			max-width: calc(100% - 2em - 26px);
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body.toc-sidebar #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}
		body.toc-sidebar #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	/* Hide main scroller when only the ToC is visible anyway */
	@media screen and (max-width: 28em) {
		body.toc-sidebar {
			overflow: hidden;
		}
	}

	/* Sidebar with its own space */
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body:not(.toc-inline) #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}

		body:not(.toc-inline) {
			padding-left: 29em;
		}
		/* See also Overflow section at the bottom */

		body:not(.toc-inline) #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) {
			margin: 0 4em;
		}
	}

/******************************************************************************/
/*                                Sectioning                                  */
/******************************************************************************/

/** Headings ******************************************************************/

	h1, h2, h3, h4, h5, h6, dt {
		page-break-after: avoid;
		page-break-inside: avoid;
		font: 100% sans-serif;   /* Reset all font styling to clear out UA styles */
		font-family: inherit;    /* Inherit the font family. */
		line-height: 1.2;        /* Keep wrapped headings compact */
		hyphens: manual;         /* Hyphenated headings look weird */
	}

	h2, h3, h4, h5, h6 {
		margin-top: 3rem;
	}

	h1, h2, h3 {
		color: #005A9C;
		background: transparent;
	}

	h1 { font-size: 170%; }
	h2 { font-size: 140%; }
	h3 { font-size: 120%; }
	h4 { font-weight: bold; }
	h5 { font-style: italic; }
	h6 { font-variant: small-caps; }
	dt { font-weight: bold; }

/** Subheadings ***************************************************************/

	h1 + h2,
	#subtitle {
		/* #subtitle is a subtitle in an H2 under the H1 */
		margin-top: 0;
	}
	h2 + h3,
	h3 + h4,
	h4 + h5,
	h5 + h6 {
		margin-top: 1.2em; /* = 1 x line-height */
	}

/** Section divider ***********************************************************/

	:not(.head) > hr {
		font-size: 1.5em;
		text-align: center;
		margin: 1em auto;
		height: auto;
		border: transparent solid 0;
		background: transparent;
	}
	:not(.head) > hr::before {
		content: "\2727\2003\2003\2727\2003\2003\2727";
	}

/******************************************************************************/
/*                            Paragraphs and Lists                            */
/******************************************************************************/

	p {
		margin: 1em 0;
	}

	dd > p:first-child,
	li > p:first-child {
		margin-top: 0;
	}

	ul, ol {
		margin-left: 0;
		padding-left: 2em;
	}

	li {
		margin: 0.25em 0 0.5em;
		padding: 0;
	}

	dl dd {
		margin: 0 0 .5em 2em;
	}

	.head dd + dd { /* compact for header */
		margin-top: -.5em;
	}

	/* Style for algorithms */
	ol.algorithm ol:not(.algorithm),
	.algorithm > ol ol:not(.algorithm) {
	 border-left: 0.5em solid #DEF;
	}

	/* Put nice boxes around each algorithm. */
	[data-algorithm]:not(.heading) {
	  padding: .5em;
	  border: thin solid #ddd; border-radius: .5em;
	  margin: .5em calc(-0.5em - 1px);
	}
	[data-algorithm]:not(.heading) > :first-child {
	  margin-top: 0;
	}
	[data-algorithm]:not(.heading) > :last-child {
	  margin-bottom: 0;
	}

	/* Style for switch/case <dl>s */
	dl.switch > dd > ol.only,
	dl.switch > dd > .only > ol {
	 margin-left: 0;
	}
	dl.switch > dd > ol.algorithm,
	dl.switch > dd > .algorithm > ol {
	 margin-left: -2em;
	}
	dl.switch {
	 padding-left: 2em;
	}
	dl.switch > dt {
	 text-indent: -1.5em;
	 margin-top: 1em;
	}
	dl.switch > dt + dt {
	 margin-top: 0;
	}
	dl.switch > dt::before {
	 content: '\21AA';
	 padding: 0 0.5em 0 0;
	 display: inline-block;
	 width: 1em;
	 text-align: right;
	 line-height: 0.5em;
	}

/** Terminology Markup ********************************************************/


/******************************************************************************/
/*                                 Inline Markup                              */
/******************************************************************************/

/** Terminology Markup ********************************************************/
	dfn   { /* Defining instance */
		font-weight: bolder;
	}
	a > i { /* Instance of term */
		font-style: normal;
	}
	dt dfn code, code.idl {
		font-size: medium;
	}
	dfn var {
		font-style: normal;
	}

/** Change Marking ************************************************************/

	del { color: red;  text-decoration: line-through; }
	ins { color: #080; text-decoration: underline;    }

/** Miscellaneous improvements to inline formatting ***************************/

	sup {
		vertical-align: super;
		font-size: 80%
	}

/******************************************************************************/
/*                                    Code                                    */
/******************************************************************************/

/** General monospace/pre rules ***********************************************/

	pre, code, samp {
		font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace;
		font-size: .9em;
		page-break-inside: avoid;
		hyphens: none;
		text-transform: none;
	}
	pre code,
	code code {
		font-size: 100%;
	}

	pre {
		margin-top: 1em;
		margin-bottom: 1em;
		overflow: auto;
	}

/** Inline Code fragments *****************************************************/

  /* Do something nice. */

/******************************************************************************/
/*                                    Links                                   */
/******************************************************************************/

/** General Hyperlinks ********************************************************/

	/* We hyperlink a lot, so make it less intrusive */
	a[href] {
		color: #034575;
		text-decoration: none;
		border-bottom: 1px solid #707070;
		/* Need a bit of extending for it to look okay */
		padding: 0 1px 0;
		margin: 0 -1px 0;
	}
	a:visited {
		border-bottom-color: #BBB;
	}

	/* Use distinguishing colors when user is interacting with the link */
	a[href]:focus,
	a[href]:hover {
		background: #f8f8f8;
		background: rgba(75%, 75%, 75%, .25);
		border-bottom-width: 3px;
		margin-bottom: -2px;
	}
	a[href]:active {
		color: #C00;
		border-color: #C00;
	}

	/* Backout above styling for W3C logo */
	.head .logo,
	.head .logo a {
		border: none;
		text-decoration: none;
		background: transparent;
	}

/******************************************************************************/
/*                                    Images                                  */
/******************************************************************************/

	img {
		border-style: none;
	}

	/* For autogen numbers, add
	   .caption::before, figcaption::before { content: "Figure " counter(figure) ". "; }
	*/

	figure, .figure, .sidefigure {
		page-break-inside: avoid;
		text-align: center;
		margin: 2.5em 0;
	}
	.figure img,    .sidefigure img,    figure img,
	.figure object, .sidefigure object, figure object {
		max-width: 100%;
		margin: auto;
	}
	.figure pre, .sidefigure pre, figure pre {
		text-align: left;
		display: table;
		margin: 1em auto;
	}
	.figure table, figure table {
		margin: auto;
	}
	@media screen and (min-width: 20em) {
		.sidefigure {
			float: right;
			width: 50%;
			margin: 0 0 0.5em 0.5em
		}
	}
	.caption, figcaption, caption {
		font-style: italic;
		font-size: 90%;
	}
	.caption::before, figcaption::before, figcaption > .marker {
		font-weight: bold;
	}
	.caption, figcaption {
		counter-increment: figure;
	}

	/* DL list is indented 2em, but figure inside it is not */
	dd > .figure, dd > figure { margin-left: -2em }

/******************************************************************************/
/*                             Colored Boxes                                  */
/******************************************************************************/

	.issue, .note, .example, .assertion, .advisement, blockquote {
		padding: .5em;
		border: .5em;
		border-left-style: solid;
		page-break-inside: avoid;
	}
	span.issue, span.note {
		padding: .1em .5em .15em;
		border-right-style: solid;
	}

	.issue,
	.note,
	.example,
	.advisement,
	.assertion,
	blockquote {
		margin: 1em auto;
	}
	.note  > p:first-child,
	.issue > p:first-child,
	blockquote > :first-child {
		margin-top: 0;
	}
	blockquote > :last-child {
		margin-bottom: 0;
	}

/** Blockquotes ***************************************************************/

	blockquote {
		border-color: silver;
	}

/** Open issue ****************************************************************/

	.issue {
		border-color: #E05252;
		background: #FBE9E9;
		counter-increment: issue;
		overflow: auto;
	}
	.issue::before, .issue > .marker {
		text-transform: uppercase;
		color: #AE1E1E;
		padding-right: 1em;
		text-transform: uppercase;
	}
	/* Add .issue::before { content: "Issue " counter(issue) " "; } for autogen numbers,
	   or use class="marker" to mark up the issue number in source. */

/** Example *******************************************************************/

	.example {
		border-color: #E0CB52;
		background: #FCFAEE;
		counter-increment: example;
		overflow: auto;
		clear: both;
	}
	.example::before, .example > .marker {
		text-transform: uppercase;
		color: #827017;
		min-width: 7.5em;
		display: block;
	}
	/* Add .example::before { content: "Example " counter(example) " "; } for autogen numbers,
	   or use class="marker" to mark up the example number in source. */

/** Non-normative Note ********************************************************/

	.note {
		border-color: #52E052;
		background: #E9FBE9;
		overflow: auto;
	}

	.note::before, .note > .marker,
	details.note > summary::before,
	details.note > summary > .marker {
		text-transform: uppercase;
		display: block;
		color: hsl(120, 70%, 30%);
	}
	/* Add .note::before { content: "Note"; } for autogen label,
	   or use class="marker" to mark up the label in source. */

	details.note > summary {
		display: block;
		color: hsl(120, 70%, 30%);
	}
	details.note[open] > summary {
		border-bottom: 1px silver solid;
	}

/** Assertion Box *************************************************************/
	/*  for assertions in algorithms */

	.assertion {
		border-color: #AAA;
		background: #EEE;
	}

/** Advisement Box ************************************************************/
	/*  for attention-grabbing normative statements */

	.advisement {
		border-color: orange;
		border-style: none solid;
		background: #FFEECC;
	}
	strong.advisement {
		display: block;
		text-align: center;
	}
	.advisement > .marker {
		color: #B35F00;
	}

/** Spec Obsoletion Notice ****************************************************/
	/* obnoxious obsoletion notice for older/abandoned specs. */

	details {
		display: block;
	}
	summary {
		font-weight: bolder;
	}

	.annoying-warning:not(details),
	details.annoying-warning:not([open]) > summary,
	details.annoying-warning[open] {
		background: #fdd;
		color: red;
		font-weight: bold;
		padding: .75em 1em;
		border: thick red;
		border-style: solid;
		border-radius: 1em;
	}
	.annoying-warning :last-child {
		margin-bottom: 0;
	}

@media not print {
	details.annoying-warning[open] {
		position: fixed;
		left: 1em;
		right: 1em;
		bottom: 1em;
		z-index: 1000;
	}
}

	details.annoying-warning:not([open]) > summary {
		text-align: center;
	}

/** Entity Definition Boxes ***************************************************/

	.def {
		padding: .5em 1em;
		background: #DEF;
		margin: 1.2em 0;
		border-left: 0.5em solid #8CCBF2;
	}

/******************************************************************************/
/*                                    Tables                                  */
/******************************************************************************/

	th, td {
		text-align: left;
		text-align: start;
	}

/** Property/Descriptor Definition Tables *************************************/

	table.def {
		/* inherits .def box styling, see above */
		width: 100%;
		border-spacing: 0;
	}

	table.def td,
	table.def th {
		padding: 0.5em;
		vertical-align: baseline;
		border-bottom: 1px solid #bbd7e9;
	}

	table.def > tbody > tr:last-child th,
	table.def > tbody > tr:last-child td {
		border-bottom: 0;
	}

	table.def th {
		font-style: italic;
		font-weight: normal;
		padding-left: 1em;
		width: 3em;
	}

	/* For when values are extra-complex and need formatting for readability */
	table td.pre {
		white-space: pre-wrap;
	}

	/* A footnote at the bottom of a def table */
	table.def           td.footnote {
		padding-top: 0.6em;
	}
	table.def           td.footnote::before {
		content: " ";
		display: block;
		height: 0.6em;
		width: 4em;
		border-top: thin solid;
	}

/** Data tables (and properly marked-up index tables) *************************/
	/*
		 <table class="data"> highlights structural relationships in a table
		 when correct markup is used (e.g. thead/tbody, th vs. td, scope attribute)

		 Use class="complex data" for particularly complicated tables --
		 (This will draw more lines: busier, but clearer.)

		 Use class="long" on table cells with paragraph-like contents
		 (This will adjust text alignment accordingly.)
		 Alternately use class="longlastcol" on tables, to have the last column assume "long".
	*/

	table {
		word-wrap: normal;
		overflow-wrap: normal;
		hyphens: manual;
	}

	table.data,
	table.index {
		margin: 1em auto;
		border-collapse: collapse;
		border: hidden;
		width: 100%;
	}
	table.data caption,
	table.index caption {
		max-width: 50em;
		margin: 0 auto 1em;
	}

	table.data td,  table.data th,
	table.index td, table.index th {
		padding: 0.5em 1em;
		border-width: 1px;
		border-color: silver;
		border-top-style: solid;
	}

	table.data thead td:empty {
		padding: 0;
		border: 0;
	}

	table.data  thead,
	table.index thead,
	table.data  tbody,
	table.index tbody {
		border-bottom: 2px solid;
	}

	table.data colgroup,
	table.index colgroup {
		border-left: 2px solid;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		border-right: 2px solid;
		border-top: 1px solid silver;
		padding-right: 1em;
	}

	table.data th[colspan],
	table.data td[colspan] {
		text-align: center;
	}

	table.complex.data th,
	table.complex.data td {
		border: 1px solid silver;
		text-align: center;
	}

	table.data.longlastcol td:last-child,
	table.data td.long {
	 vertical-align: baseline;
	 text-align: left;
	}

	table.data img {
		vertical-align: middle;
	}


/*
Alternate table alignment rules

	table.data,
	table.index {
		text-align: center;
	}

	table.data  thead th[scope="row"],
	table.index thead th[scope="row"] {
		text-align: right;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		text-align: right;
	}

Possible extra rowspan handling

	table.data  tbody th[rowspan]:not([rowspan='1']),
	table.index tbody th[rowspan]:not([rowspan='1']),
	table.data  tbody td[rowspan]:not([rowspan='1']),
	table.index tbody td[rowspan]:not([rowspan='1']) {
		border-left: 1px solid silver;
	}

	table.data  tbody th[rowspan]:first-child,
	table.index tbody th[rowspan]:first-child,
	table.data  tbody td[rowspan]:first-child,
	table.index tbody td[rowspan]:first-child{
		border-left: 0;
		border-right: 1px solid silver;
	}
*/

/******************************************************************************/
/*                                  Indices                                   */
/******************************************************************************/


/** Table of Contents *********************************************************/

	.toc a {
		/* More spacing; use padding to make it part of the click target. */
		padding-top: 0.1rem;
		/* Larger, more consistently-sized click target */
		display: block;
		/* Reverse color scheme */
		color: black;
		border-color: #3980B5;
		border-bottom-width: 3px !important;
		margin-bottom: 0px !important;
	}
	.toc a:visited {
		border-color: #054572;
	}
	.toc a:not(:focus):not(:hover) {
		/* Allow colors to cascade through from link styling */
		border-bottom-color: transparent;
	}

	.toc, .toc ol, .toc ul, .toc li {
		list-style: none; /* Numbers must be inlined into source */
		/* because generated content isn't search/selectable and markers can't do multilevel yet */
		margin:  0;
		padding: 0;
		line-height: 1.1rem; /* consistent spacing */
	}

	/* ToC not indented until third level, but font style & margins show hierarchy */
	.toc > li             { font-weight: bold;   }
	.toc > li li          { font-weight: normal; }
	.toc > li li li       { font-size:   95%;    }
	.toc > li li li li    { font-size:   90%;    }
	.toc > li li li li .secno { font-size: 85%; }
	.toc > li li li li li { font-size:   85%;    }
	.toc > li li li li li .secno { font-size: 100%; }

	/* @supports not (display:grid) { */
		.toc > li             { margin: 1.5rem 0;    }
		.toc > li li          { margin: 0.3rem 0;    }
		.toc > li li li       { margin-left: 2rem;   }

		/* Section numbers in a column of their own */
		.toc .secno {
			float: left;
			width: 4rem;
			white-space: nowrap;
		}

		.toc li {
			clear: both;
		}

		:not(li) > .toc              { margin-left:  5rem; }
		.toc .secno                  { margin-left: -5rem; }
		.toc > li li li .secno       { margin-left: -7rem; }
		.toc > li li li li .secno    { margin-left: -9rem; }
		.toc > li li li li li .secno { margin-left: -11rem; }

		/* Tighten up indentation in narrow ToCs */
		@media (max-width: 30em) {
			:not(li) > .toc              { margin-left:  4rem; }
			.toc .secno                  { margin-left: -4rem; }
			.toc > li li li              { margin-left:  1rem; }
			.toc > li li li .secno       { margin-left: -5rem; }
			.toc > li li li li .secno    { margin-left: -6rem; }
			.toc > li li li li li .secno { margin-left: -7rem; }
		}
	/* } */

	@supports (display:grid) and (display:contents) {
		/* Use #toc over .toc to override non-@supports rules. */
		#toc {
			display: grid;
			align-content: start;
			grid-template-columns: auto 1fr;
			grid-column-gap: 1rem;
			column-gap: 1rem;
			grid-row-gap: .6rem;
			row-gap: .6rem;
		}
		#toc h2 {
			grid-column: 1 / -1;
			margin-bottom: 0;
		}
		#toc ol,
		#toc li,
		#toc a {
			display: contents;
			/* Switch <a> to subgrid when supported */
		}
		#toc span {
			margin: 0;
		}
		#toc > .toc > li > a > span {
			/* The spans of the top-level list,
			   comprising the first items of each top-level section. */
			margin-top: 1.1rem;
		}
		#toc#toc .secno { /* Ugh, need more specificity to override base.css */
			grid-column: 1;
			width: auto;
			margin-left: 0;
		}
		#toc .content {
			grid-column: 2;
			width: auto;
			margin-right: 1rem;
		}
		#toc .content:hover {
			background: rgba(75%, 75%, 75%, .25);
			border-bottom: 3px solid #054572;
			margin-bottom: -3px;
		}
		#toc li li li .content {
			margin-left: 1rem;
		}
		#toc li li li li .content {
			margin-left: 2rem;
		}
	}


/** Index *********************************************************************/

	/* Index Lists: Layout */
	ul.index       { margin-left: 0; columns: 15em; text-indent: 1em hanging; }
	ul.index li    { margin-left: 0; list-style: none; break-inside: avoid; }
	ul.index li li { margin-left: 1em }
	ul.index dl    { margin-top: 0; }
	ul.index dt    { margin: .2em 0 .2em 20px;}
	ul.index dd    { margin: .2em 0 .2em 40px;}
	/* Index Lists: Typography */
	ul.index ul,
	ul.index dl { font-size: smaller; }
	@media not print {
		ul.index li span {
			white-space: nowrap;
			color: transparent; }
		ul.index li a:hover + span,
		ul.index li a:focus + span {
			color: #707070;
		}
	}

/** Index Tables *****************************************************/
	/* See also the data table styling section, which this effectively subclasses */

	table.index {
		font-size: small;
		border-collapse: collapse;
		border-spacing: 0;
		text-align: left;
		margin: 1em 0;
	}

	table.index td,
	table.index th {
		padding: 0.4em;
	}

	table.index tr:hover td:not([rowspan]),
	table.index tr:hover th:not([rowspan]) {
		background: #f7f8f9;
	}

	/* The link in the first column in the property table (formerly a TD) */
	table.index th:first-child a {
		font-weight: bold;
	}

/******************************************************************************/
/*                                    Print                                   */
/******************************************************************************/

	@media print {
		/* Pages have their own margins. */
		html {
			margin: 0;
		}
		/* Serif for print. */
		body {
			font-family: serif;
		}
	}
	@page {
		margin: 1.5cm 1.1cm;
	}

/******************************************************************************/
/*                                    Legacy                                  */
/******************************************************************************/

	/* This rule is inherited from past style sheets. No idea what it's for. */
	.hide { display: none }



/******************************************************************************/
/*                             Overflow Control                               */
/******************************************************************************/

	.figure .caption, .sidefigure .caption, figcaption {
		/* in case figure is overlarge, limit caption to 50em */
		max-width: 50rem;
		margin-left: auto;
		margin-right: auto;
	}
	.overlarge {
		/* Magic to create good table positioning:
		   "content column" is 50ems wide at max; less on smaller screens.
		   Extra space (after ToC + content) is empty on the right.

		   1. When table < content column, centers table in column.
		   2. When content < table < available, left-aligns.
		   3. When table > available, fills available + scroll bar.
		*/ 
		display: grid;
		grid-template-columns: minmax(0, 50em);
	}
	.overlarge > table {
		/* limit preferred width of table */
		max-width: 50em;
		margin-left: auto;
		margin-right: auto;
	}

	@media (min-width: 55em) {
		.overlarge {
			margin-right: calc(13px + 26.5rem - 50vw);
			max-width: none;
		}
	}
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) .overlarge {
			/* 30.5em body padding 50em content area */
			margin-right: calc(40em - 50vw) !important;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) .overlarge {
			/* 4em html margin 30.5em body padding 50em content area */
			margin-right: calc(84.5em - 100vw) !important;
		}
	}

	@media not print {
		.overlarge {
			overflow-x: auto;
			/* See Lea Verou's explanation background-attachment:
			 * http://lea.verou.me/2012/04/background-attachment-local/
			 *
			background: top left  / 4em 100% linear-gradient(to right,  #ffffff, rgba(255, 255, 255, 0)) local,
			            top right / 4em 100% linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0)) local,
			            top left  / 1em 100% linear-gradient(to right,  #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            top right / 1em 100% linear-gradient(to left, #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            white;
			background-repeat: no-repeat;
			*/
		}
	}
</style>
  <link href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED" rel="stylesheet" type="text/css">
  <link href="https://www.w3.org/TR/webxr/" rel="canonical">
  <link href="favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
  <link href="favicon-96x96.png" rel="icon" sizes="96x96" type="image/png">
<style>
  .head h1:after {
    content: url(images/spec-logo.png);
    float: right;
  }

  .unstable::before {
    content: "This section is not stable";
    display: block;
    font-weight: bold;
    text-align: right;
    color: red;
  }
  .unstable {
    border: thin solid pink;
    border-radius: .5em;
    padding: .5em;
    margin: .5em calc(-0.5em - 1px);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='290'><text transform='rotate(-45)' text-anchor='middle' font-family='sans-serif' font-weight='bold' font-size='70' y='210' opacity='.1'>Unstable</text></svg>");
    background-repeat: repeat;
    background-color: #FFF4F4;
  }
  .unstable h3:first-of-type {
    margin-top: 0.5rem;
  }

  .unstable.example:not(.no-marker)::before {
    content: "Example " counter(example) " (Unstable)";
    float: none;
  }

  .non-normative::before {
    content: "This section is non-normative.";
    font-style: italic;
  }
  .tg {
    border-collapse: collapse;
    border-spacing: 0;
  }
  .tg th {
    border-style: solid;
    border-width: 1px;
    background: #90b8de;
    color: #fff;
    font-family: sans-serif;
    font-weight: bold;
    border-color: grey;
  }
  .tg td {
    padding: 4px 5px;
    background-color: rgb(221, 238, 255);
    font-family: monospace;
    border-style: solid;
    border-width: 1px;
    border-color: grey;
    overflow: hidden;
    word-break: normal;
  }
</style>
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-var-click-highlighting */

    var { cursor: pointer; }
    var.selected0 { background-color: #F4D200; box-shadow: 0 0 0 2px #F4D200; }
    var.selected1 { background-color: #FF87A2; box-shadow: 0 0 0 2px #FF87A2; }
    var.selected2 { background-color: #96E885; box-shadow: 0 0 0 2px #96E885; }
    var.selected3 { background-color: #3EEED2; box-shadow: 0 0 0 2px #3EEED2; }
    var.selected4 { background-color: #EACFB6; box-shadow: 0 0 0 2px #EACFB6; }
    var.selected5 { background-color: #82DDFF; box-shadow: 0 0 0 2px #82DDFF; }
    var.selected6 { background-color: #FFBCF2; box-shadow: 0 0 0 2px #FFBCF2; }
    </style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-syntax-highlighting */
pre.idl.highlight { color: #708090; }
.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">WebXR Device API</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <div data-fill-with="spec-metadata">
    <dl>
     <dt>This version:
     <dd><a class="u-url" href="https://immersive-web.github.io/webxr/">https://immersive-web.github.io/webxr/</a>
     <dt>Latest published version:
     <dd><a href="https://www.w3.org/TR/webxr/">https://www.w3.org/TR/webxr/</a>
     <dt>Previous Versions:
     <dd><a href="https://www.w3.org/TR/2019/WD-webxr-20191010/" rel="prev">https://www.w3.org/TR/2019/WD-webxr-20191010/</a>
     <dt class="editor">Editors:
     <dd class="editor p-author h-card vcard" data-editor-id="87824"><a class="p-name fn u-email email" href="mailto:bajones@google.com">Brandon Jones</a> (<a class="p-org org" href="http://google.com/">Google</a>)
     <dd class="editor p-author h-card vcard" data-editor-id="93109"><a class="p-name fn u-email email" href="mailto:nhw@amazon.com">Nell Waliczek</a> (<a class="p-org org" href="https://amazon.com/">Amazon [Microsoft until 2018]</a>)
     <dd class="editor p-author h-card vcard"><span class="p-name fn"></span>
     <dt>Participate:
     <dd><a href="https://github.com/immersive-web/webxr/issues/new">File an issue</a> (<a href="https://github.com/immersive-web/webxr/issues">open issues</a>)
     <dd><a href="https://lists.w3.org/Archives/Public/public-immersive-web/">Mailing list archive</a>
     <dd><a href="irc://irc.w3.org:6665/">W3C’s #immersive-web IRC</a>
     <dd>
    </dl>
   </div>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document" rel="license">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>This specification describes support for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays, on the Web.</p>
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> <em>This section describes the status of this document at the time of its publication. Other
    documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision of this
    technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical
    reports index</a> at http://www.w3.org/TR/.</em> </p>
   <p> This document was published by the <a href="https://www.w3.org/immersive-web/">Immersive Web Working Group</a> as an Editors' Draft. This document is intended to become a W3C Recommendation.

    Feedback and comments on this specification are welcome. Please use <a href="https://github.com/immersive-web/webxr/issues">Github issues</a>.
    Discussions may also be found in the <a href="http://lists.w3.org/Archives/Public/public-immersive-web/">public-immersive-web@w3.org archives</a>. </p>
   <p> Publication as an Editors' Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership. This is a draft document and may
    be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite
    this document as other than work in progress. </p>
   <p> This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy/"> <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>. <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="https://www.w3.org/2004/01/pp-impl/109735/status" rel="disclosure">public list of any
    patent disclosures</a> made in connection with the deliverables of the group; that page also
    includes instructions for disclosing a patent. An individual who has actual knowledge of a
    patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential
    Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li>
     <a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
     <ol class="toc">
      <li><a href="#terminology"><span class="secno">1.1</span> <span class="content">Terminology</span></a>
      <li><a href="#applicationflow"><span class="secno">1.2</span> <span class="content">Application flow</span></a>
     </ol>
    <li>
     <a href="#model"><span class="secno">2</span> <span class="content">Model</span></a>
     <ol class="toc">
      <li><a href="#xr-device-concept"><span class="secno">2.1</span> <span class="content">XR device</span></a>
     </ol>
    <li>
     <a href="#initialization"><span class="secno">3</span> <span class="content">Initialization</span></a>
     <ol class="toc">
      <li><a href="#navigator-xr-attribute"><span class="secno">3.1</span> <span class="content">navigator.xr</span></a>
      <li><a href="#xr-interface"><span class="secno">3.2</span> <span class="content">XR</span></a>
      <li><a href="#xrsessionmode-enum"><span class="secno">3.3</span> <span class="content">XRSessionMode</span></a>
      <li><a href="#feature-dependencies"><span class="secno">3.4</span> <span class="content">Feature Dependencies</span></a>
     </ol>
    <li>
     <a href="#session"><span class="secno">4</span> <span class="content">Session</span></a>
     <ol class="toc">
      <li><a href="#xrsession-interface"><span class="secno">4.1</span> <span class="content">XRSession</span></a>
      <li><a href="#xrrenderstate-interface"><span class="secno">4.2</span> <span class="content">XRRenderState</span></a>
      <li><a href="#animation-frames"><span class="secno">4.3</span> <span class="content">Animation Frames</span></a>
      <li><a href="#compositor"><span class="secno">4.4</span> <span class="content">The XR Compositor</span></a>
     </ol>
    <li>
     <a href="#frame"><span class="secno">5</span> <span class="content">Frame Loop</span></a>
     <ol class="toc">
      <li><a href="#xrframe-interface"><span class="secno">5.1</span> <span class="content">XRFrame</span></a>
     </ol>
    <li>
     <a href="#spaces"><span class="secno">6</span> <span class="content">Spaces</span></a>
     <ol class="toc">
      <li><a href="#xrspace-interface"><span class="secno">6.1</span> <span class="content">XRSpace</span></a>
      <li><a href="#xrreferencespace-interface"><span class="secno">6.2</span> <span class="content">XRReferenceSpace</span></a>
      <li><a href="#xrboundedreferencespace-interface"><span class="secno">6.3</span> <span class="content">XRBoundedReferenceSpace</span></a>
     </ol>
    <li>
     <a href="#views"><span class="secno">7</span> <span class="content">Views</span></a>
     <ol class="toc">
      <li><a href="#xrview-interface"><span class="secno">7.1</span> <span class="content">XRView</span></a>
      <li><a href="#xrviewport-interface"><span class="secno">7.2</span> <span class="content">XRViewport</span></a>
     </ol>
    <li>
     <a href="#geometricprimitives"><span class="secno">8</span> <span class="content">Geometric Primitives</span></a>
     <ol class="toc">
      <li><a href="#matrices"><span class="secno">8.1</span> <span class="content">Matrices</span></a>
      <li><a href="#normalization"><span class="secno">8.2</span> <span class="content">Normalization</span></a>
      <li><a href="#xrrigidtransform-interface"><span class="secno">8.3</span> <span class="content">XRRigidTransform</span></a>
     </ol>
    <li>
     <a href="#pose"><span class="secno">9</span> <span class="content">Pose</span></a>
     <ol class="toc">
      <li><a href="#xrpose-interface"><span class="secno">9.1</span> <span class="content">XRPose</span></a>
      <li><a href="#xrviewerpose-interface"><span class="secno">9.2</span> <span class="content">XRViewerPose</span></a>
     </ol>
    <li>
     <a href="#input"><span class="secno">10</span> <span class="content">Input</span></a>
     <ol class="toc">
      <li><a href="#xrinputsource-interface"><span class="secno">10.1</span> <span class="content">XRInputSource</span></a>
      <li><a href="#transient-input"><span class="secno">10.2</span> <span class="content">Transient input</span></a>
      <li><a href="#xrinputsourcearray-interface"><span class="secno">10.3</span> <span class="content">XRInputSourceArray</span></a>
     </ol>
    <li>
     <a href="#layers"><span class="secno">11</span> <span class="content">Layers</span></a>
     <ol class="toc">
      <li><a href="#xrwebgllayer-interface"><span class="secno">11.1</span> <span class="content">XRWebGLLayer</span></a>
      <li><a href="#contextcompatibility"><span class="secno">11.2</span> <span class="content">WebGL Context Compatibility</span></a>
     </ol>
    <li>
     <a href="#events"><span class="secno">12</span> <span class="content">Events</span></a>
     <ol class="toc">
      <li><a href="#xrsessionevent-interface"><span class="secno">12.1</span> <span class="content">XRSessionEvent</span></a>
      <li><a href="#xrinputsourceevent-interface"><span class="secno">12.2</span> <span class="content">XRInputSourceEvent</span></a>
      <li><a href="#xrinputsourceschangeevent-interface"><span class="secno">12.3</span> <span class="content">XRInputSourcesChangeEvent</span></a>
      <li><a href="#xrreferencespaceevent-interface"><span class="secno">12.4</span> <span class="content">XRReferenceSpaceEvent</span></a>
      <li><a href="#event-types"><span class="secno">12.5</span> <span class="content">Event Types</span></a>
     </ol>
    <li>
     <a href="#security"><span class="secno">13</span> <span class="content">Security, Privacy, and Comfort Considerations</span></a>
     <ol class="toc">
      <li>
       <a href="#sensitive-information-header"><span class="secno">13.1</span> <span class="content">Sensitive Information</span></a>
       <ol class="toc">
        <li><a href="#active-and-focused-document"><span class="secno">13.1.1</span> <span class="content">Active and focused document</span></a>
        <li><a href="#trustworthy-documents"><span class="secno">13.1.2</span> <span class="content">Trustworthy documents and origins</span></a>
       </ol>
      <li>
       <a href="#user-intention"><span class="secno">13.2</span> <span class="content">User intention</span></a>
       <ol class="toc">
        <li><a href="#user-activation"><span class="secno">13.2.1</span> <span class="content">User activation</span></a>
        <li><a href="#application-launch"><span class="secno">13.2.2</span> <span class="content">Launching a web application</span></a>
        <li><a href="#user-consent"><span class="secno">13.2.3</span> <span class="content">Implicit and Explicit consent</span></a>
        <li><a href="#consent-duration"><span class="secno">13.2.4</span> <span class="content">Duration of consent</span></a>
       </ol>
      <li><a href="#mid-session-consent"><span class="secno">13.3</span> <span class="content">Mid-session consent</span></a>
      <li>
       <a href="#data-adjustments-header"><span class="secno">13.4</span> <span class="content">Data adjustments</span></a>
       <ol class="toc">
        <li><a href="#throttling-header"><span class="secno">13.4.1</span> <span class="content">Throttling</span></a>
        <li><a href="#rounding-and-friends"><span class="secno">13.4.2</span> <span class="content">Rounding, quantization, and fuzzing</span></a>
        <li><a href="#limiting-header"><span class="secno">13.4.3</span> <span class="content">Limiting</span></a>
       </ol>
      <li>
       <a href="#protected-functionality"><span class="secno">13.5</span> <span class="content">Protected functionality</span></a>
       <ol class="toc">
        <li><a href="#protect-immersiveness"><span class="secno">13.5.1</span> <span class="content">Immersiveness</span></a>
        <li><a href="#protect-poses"><span class="secno">13.5.2</span> <span class="content">Poses</span></a>
        <li><a href="#protect-reference-spaces"><span class="secno">13.5.3</span> <span class="content">Reference spaces</span></a>
       </ol>
      <li><a href="#trustedenvironment-security"><span class="secno">13.6</span> <span class="content">Trusted Environment</span></a>
      <li><a href="#contextisolation-security"><span class="secno">13.7</span> <span class="content">Context Isolation</span></a>
      <li><a href="#fingerprinting-security"><span class="secno">13.8</span> <span class="content">Fingerprinting</span></a>
     </ol>
    <li>
     <a href="#integrations"><span class="secno">14</span> <span class="content">Integrations</span></a>
     <ol class="toc">
      <li><a href="#feature-policy"><span class="secno">14.1</span> <span class="content">Feature Policy</span></a>
     </ol>
    <li><a href="#ack"><span class="secno">15</span> <span class="content">Acknowledgements</span></a>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
     </ol>
    <li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
   <section class="non-normative">
    <p>Hardware that enables Virtual Reality (VR) and Augmented Reality (AR) applications are now broadly available to consumers, offering an immersive computing platform with both new opportunities and challenges. The ability to interact directly with immersive hardware is critical to ensuring that the web is well equipped to operate as a first-class citizen in this environment.</p>
    <p>Immersive computing introduces strict requirements for high-precision, low-latency communication in order to deliver an acceptable experience. It also brings unique <a href="#security">security</a> concerns for a platform like the web. The WebXR Device API provides the interfaces necessary to enable developers to build compelling, comfortable, and safe immersive applications on the web across a wide variety of hardware form factors.</p>
    <p>Other web interfaces, such as the <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/orientation-sensor/#relativeorientationsensor" id="ref-for-relativeorientationsensor">RelativeOrientationSensor</a></code> and <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/orientation-sensor/#absoluteorientationsensor" id="ref-for-absoluteorientationsensor">AbsoluteOrientationSensor</a></code>, can be repurposed to surface input from some devices to polyfill the WebXR Device API in limited situations. These interfaces cannot support multiple features of high-end immersive experiences, however, such as <a data-link-type="dfn" href="#6dof" id="ref-for-6dof">6DoF</a> tracking, presentation to headset peripherals, or tracked input devices.</p>
   </section>
   <h3 class="heading settled" data-level="1.1" id="terminology"><span class="secno">1.1. </span><span class="content">Terminology</span><a class="self-link" href="#terminology"></a></h3>
   <p>This document uses the acronym <b>XR</b> throughout to refer to the spectrum of hardware, applications, and techniques used for Virtual Reality, Augmented Reality, and other related technologies. Examples include, but are not limited to:</p>
   <ul>
    <li data-md>
     <p>Head-mounted displays, whether they are opaque, transparent, or utilize video passthrough</p>
    <li data-md>
     <p>Mobile devices with positional tracking</p>
    <li data-md>
     <p>Fixed displays with head tracking capabilities</p>
   </ul>
   <p>The important commonality between them being that they offer some degree of spatial tracking with which to simulate a view of virtual content.</p>
   <p>Terms like "XR device", "XR Application", etc. are generally understood to apply to any of the above. Portions of this document that only apply to a subset of these devices will indicate so as appropriate.</p>
   <p>The terms <a data-link-type="dfn" href="#3dof" id="ref-for-3dof">3DoF</a> and <a data-link-type="dfn" href="#6dof" id="ref-for-6dof①">6DoF</a> are used throughout this document to describe the tracking capabilities of <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device">XR devices</a>.</p>
   <ul>
    <li data-md>
     <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="3dof">3DoF</dfn> device, short for "Three Degrees of Freedom", is one that can only track rotational movement. This is common in devices which rely exclusively on accelerometer and gyroscope readings to provide tracking. <a data-link-type="dfn" href="#3dof" id="ref-for-3dof①">3DoF</a> devices do not respond translational movements from the user, though they may employ algorithms to estimate translational changes based on modeling of the neck or arms.</p>
    <li data-md>
     <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="6dof">6DoF</dfn> device, short for "Six Degrees of Freedom", is one that can track both rotation and translation, enabling for precise 1:1 tracking in space. This typically requires some level of understanding of the user’s environment. That environmental understanding may be achieved via inside-out tracking, where sensors on the tracked device itself (such as cameras or depth sensors) are used to determine the device’s position, or outside-in tracking, where external devices placed in the user’s environment (like a camera or light emitting device) provides a stable point of reference against which the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①">XR device</a> can determine its position.</p>
   </ul>
   <h3 class="heading settled" data-level="1.2" id="applicationflow"><span class="secno">1.2. </span><span class="content">Application flow</span><a class="self-link" href="#applicationflow"></a></h3>
   <section class="non-normative">
    <p>Most applications using the WebXR Device API will follow a similar usage pattern:</p>
    <ul>
     <li data-md>
      <p>Query <code class="idl"><a data-link-type="idl" href="#dom-xr-issessionsupported" id="ref-for-dom-xr-issessionsupported">navigator.xr.isSessionSupported()</a></code> to determine if the desired type of XR content is supported by the hardware and UA.</p>
     <li data-md>
      <p>If so, advertise the XR content to the user.</p>
     <li data-md>
      <p>Wait for the user to <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation" id="ref-for-triggered-by-user-activation">trigger a user activation event</a> indicating they want to begin viewing XR content.</p>
     <li data-md>
      <p>Request an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession">XRSession</a></code> within the user activation event with <code class="idl"><a data-link-type="idl" href="#dom-xr-requestsession" id="ref-for-dom-xr-requestsession">navigator.xr.requestSession()</a></code>.</p>
     <li data-md>
      <p>If the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①">XRSession</a></code> request succeeds, use it to run a <a href="#frame">frame loop</a> to respond to XR input and produce images to display on the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device">XR device</a> in response.</p>
     <li data-md>
      <p>Continue running the <a href="#frame">frame loop</a> until the <a data-link-type="dfn" href="#shut-down-the-session" id="ref-for-shut-down-the-session">session is shut down</a> by the UA or the user indicates they want to exit the XR content.</p>
    </ul>
   </section>
   <h2 class="heading settled" data-level="2" id="model"><span class="secno">2. </span><span class="content">Model</span><a class="self-link" href="#model"></a></h2>
   <h3 class="heading settled" data-level="2.1" id="xr-device-concept"><span class="secno">2.1. </span><span class="content">XR device</span><a class="self-link" href="#xr-device-concept"></a></h3>
   <p>An <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-noexport id="xr-device">XR device</dfn> is a physical unit of hardware that can present imagery to the user. On desktop clients, this is usually a headset peripheral. On mobile clients, it may represent the mobile device itself in conjunction with a viewer harness. It may also represent devices without stereo-presentation capabilities but with more advanced tracking.</p>
   <p>An <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device②">XR device</a> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-supported-modes">list of supported modes</dfn> (a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list">list</a> of <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-string">strings</a>) that <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain">contains</a> the enumeration values of <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode">XRSessionMode</a></code> that the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device③">XR device</a> supports.</p>
   <p>The user-agent MUST have an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="inline-xr-device">inline XR device</dfn>, which is an <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device④">XR device</a> that MUST <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain①">contain</a> <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline">"inline"</a></code> in its <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes">list of supported modes</a>. The <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device">inline XR device</a> SHOULD report as much pose information of the physical device the user agent is rendering to as possible. This device MAY be the same as the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device">immersive XR device</a> if one is present, but doesn’t have to be.</p>
   <p class="note" role="note"><span>Note:</span> On phones, the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device①">inline XR device</a> may report pose information derived from the phone’s internal sensors, such as the gyroscope and accelerometer. On desktops and laptops without similar sensors, the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device②">inline XR device</a> will not be able to report a pose. In case the user agent is already running on an <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑤">XR device</a>, the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device③">inline XR device</a> will be the same device, and may support multiple <a data-link-type="dfn" href="#view" id="ref-for-view">views</a>.</p>
   <h2 class="heading settled" data-level="3" id="initialization"><span class="secno">3. </span><span class="content">Initialization</span><a class="self-link" href="#initialization"></a></h2>
   <h3 class="heading settled" data-level="3.1" id="navigator-xr-attribute"><span class="secno">3.1. </span><span class="content">navigator.xr</span><a class="self-link" href="#navigator-xr-attribute"></a></h3>
<pre class="idl highlight def"><c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator" id="ref-for-navigator"><c- g>Navigator</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xr" id="ref-for-xr"><c- n>XR</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XR" href="#dom-navigator-xr" id="ref-for-dom-navigator-xr"><c- g>xr</c-></a>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Navigator" data-dfn-type="attribute" data-export id="dom-navigator-xr"><code>xr</code></dfn> attribute’s getter MUST return the <code class="idl"><a data-link-type="idl" href="#xr" id="ref-for-xr①">XR</a></code> object that is associated with the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#context-object" id="ref-for-context-object">context object</a>.</p>
   <h3 class="heading settled" data-level="3.2" id="xr-interface"><span class="secno">3.2. </span><span class="content">XR</span><a class="self-link" href="#xr-interface"></a></h3>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xr"><code><c- g>XR</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget"><c- n>EventTarget</c-></a> {
  // Methods
  <c- b>Promise</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean"><c- b>boolean</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xr-issessionsupported" id="ref-for-dom-xr-issessionsupported①"><c- g>isSessionSupported</c-></a>(<a class="n" data-link-type="idl-name" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①"><c- n>XRSessionMode</c-></a> <dfn class="idl-code" data-dfn-for="XR/isSessionSupported(mode)" data-dfn-type="argument" data-export id="dom-xr-issessionsupported-mode-mode"><code><c- g>mode</c-></code><a class="self-link" href="#dom-xr-issessionsupported-mode-mode"></a></dfn>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#NewObject" id="ref-for-NewObject"><c- g>NewObject</c-></a>] <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession②"><c- n>XRSession</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xr-requestsession" id="ref-for-dom-xr-requestsession①"><c- g>requestSession</c-></a>(<a class="n" data-link-type="idl-name" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode②"><c- n>XRSessionMode</c-></a> <dfn class="idl-code" data-dfn-for="XR/requestSession(mode, options), XR/requestSession(mode)" data-dfn-type="argument" data-export id="dom-xr-requestsession-mode-options-mode"><code><c- g>mode</c-></code><a class="self-link" href="#dom-xr-requestsession-mode-options-mode"></a></dfn>, <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="#dictdef-xrsessioninit" id="ref-for-dictdef-xrsessioninit"><c- n>XRSessionInit</c-></a> <dfn class="idl-code" data-dfn-for="XR/requestSession(mode, options), XR/requestSession(mode)" data-dfn-type="argument" data-export id="dom-xr-requestsession-mode-options-options"><code><c- g>options</c-></code><a class="self-link" href="#dom-xr-requestsession-mode-options-options"></a></dfn> = {});

  // Events
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xr-ondevicechange" id="ref-for-dom-xr-ondevicechange"><c- g>ondevicechange</c-></a>;
};
</pre>
   <p>The user agent MUST create an <code class="idl"><a data-link-type="idl" href="#xr" id="ref-for-xr②">XR</a></code> object when a <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator" id="ref-for-navigator①">Navigator</a></code> object is created and associate it with that object.</p>
   <p>An <code class="idl"><a data-link-type="idl" href="#xr" id="ref-for-xr③">XR</a></code> object is the entry point to the API, used to query for XR features available to the user agent and initiate communication with XR hardware via the creation of <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③">XRSession</a></code>s.</p>
   <p>An <code class="idl"><a data-link-type="idl" href="#xr" id="ref-for-xr④">XR</a></code> object has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-immersive-xr-devices">list of immersive XR devices</dfn> (a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①">list</a> of <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑥">XR device</a>), which MUST be initially an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②">list</a>.</p>
   <p>An <code class="idl"><a data-link-type="idl" href="#xr" id="ref-for-xr⑤">XR</a></code> object has an <dfn class="dfn-paneled" data-dfn-for="XR" data-dfn-type="dfn" data-noexport id="xr-immersive-xr-device">immersive XR device</dfn> (null or <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑦">XR device</a>) which is initially null and represents the active <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑧">XR device</a> from the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices">list of immersive XR devices</a>.</p>
   <p>The user agent MUST be able to <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="enumerate-immersive-xr-devices">enumerate immersive XR devices</dfn> attached to the system, at which time each available device is placed in the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices①">list of immersive XR devices</a>. Subsequent algorithms requesting enumeration MUST reuse the cached <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices②">list of immersive XR devices</a>. Enumerating the devices <a data-link-type="dfn" href="#should-not-initialize-device-tracking" id="ref-for-should-not-initialize-device-tracking">should not initialize device tracking</a>. After the first enumeration the user agent MUST begin monitoring device connection and disconnection, adding connected devices to the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices③">list of immersive XR devices</a> and removing disconnected devices.</p>
   <div class="algorithm" data-algorithm="xr-device-selection">
    <p>Each time the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices④">list of immersive XR devices</a> changes the user agent should <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="select-an-immersive-xr-device">select an immersive XR device</dfn> by running the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>oldDevice</var> be the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①">immersive XR device</a>.</p>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑤">list of immersive XR devices</a> is an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list③">list</a>, set the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②">immersive XR device</a> to <code>null</code>.</p>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑥">list of immersive XR devices</a>'s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size">size</a> is one, set the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device③">immersive XR device</a> to the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑦">list of immersive XR devices</a>[0].</p>
     <li data-md>
      <p>Set the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device④">immersive XR device</a> as follows:</p>
      <dl class="switch">
       <dt> If there are any active <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④">XRSession</a></code>s and the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑧">list of immersive XR devices</a> <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain②">contains</a> <var>oldDevice</var> 
       <dd> Set the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device⑤">immersive XR device</a> to <var>oldDevice</var> 
       <dt> Otherwise 
       <dd> Set the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device⑥">immersive XR device</a> to a device of the user agent’s choosing 
      </dl>
     <li data-md>
      <p>If this is the first time devices have been enumerated or <var>oldDevice</var> equals the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device⑦">immersive XR device</a>, abort these steps.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#shut-down-the-session" id="ref-for-shut-down-the-session①">Shut down</a> any active <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤">XRSession</a></code>s.</p>
     <li data-md>
      <p>Set the <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible">XR compatible</a> boolean of all <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase">WebGLRenderingContextBase</a></code> instances to <code>false</code>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task">Queue a task</a> to <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire">fire an event</a> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xr-devicechange" id="ref-for-eventdef-xr-devicechange">devicechange</a></code> on the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#context-object" id="ref-for-context-object①">context object</a>.</p>
    </ol>
   </div>
   <p class="note" role="note"><span>Note:</span> The user agent is allowed to use any criteria it wishes to <a data-link-type="dfn" href="#select-an-immersive-xr-device" id="ref-for-select-an-immersive-xr-device">select an immersive XR device</a> when the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑨">list of immersive XR devices</a> contains multiple devices. For example, the user agent may always select the first item in the list, or provide settings UI that allows users to manage device priority. Ideally the algorithm used to select the default device is stable and will result in the same device being selected across multiple browsing sessions.</p>
   <div class="algorithm" data-algorithm="ensure-device-selected">
    <p>The user agent <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="ensures-an-immersive-xr-device-is-selected">ensures an immersive XR device is selected</dfn> by running the following steps:</p>
    <ol>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#context-object" id="ref-for-context-object②">context object</a>'s <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device⑧">immersive XR device</a> is not null, abort these steps.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#enumerate-immersive-xr-devices" id="ref-for-enumerate-immersive-xr-devices">Enumerate immersive XR devices</a>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#select-an-immersive-xr-device" id="ref-for-select-an-immersive-xr-device①">Select an immersive XR device</a>.</p>
    </ol>
   </div>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XR" data-dfn-type="attribute" data-export id="dom-xr-ondevicechange"><code>ondevicechange</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xr-devicechange" id="ref-for-eventdef-xr-devicechange①">devicechange</a></code> event type.</p>
   <div class="algorithm" data-algorithm="session-supported">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="XR" data-dfn-type="method" data-export id="dom-xr-issessionsupported"><code>isSessionSupported(<var>mode</var>)</code></dfn> method queries if a given <var>mode</var> is supported by the user agent and device capabilities. 
    <p>When this method is invoked, it MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise" id="ref-for-a-new-promise">a new Promise</a>.</p>
     <li data-md>
      <p>If <var>mode</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①">"inline"</a></code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise">resolve</a> <var>promise</var> with <code>true</code> and return it.</p>
     <li data-md>
      <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel">in parallel</a>:</p>
      <ol>
       <li data-md>
        <p>If the requesting document’s origin is not allowed to use the "xr-spatial-tracking" <a href="#feature-policy">feature policy</a>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise">reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror" id="ref-for-securityerror">SecurityError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException">DOMException</a></code> and abort these steps.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="#ensures-an-immersive-xr-device-is-selected" id="ref-for-ensures-an-immersive-xr-device-is-selected">Ensure an immersive XR device is selected</a>.</p>
       <li data-md>
        <p>If the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device⑨">immersive XR device</a> is null, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise①">resolve</a> <var>promise</var> with <code>false</code> and abort these steps.</p>
       <li data-md>
        <p>If the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①⓪">immersive XR device</a>'s <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes①">list of supported modes</a> does not <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain③">contain</a> <var>mode</var>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise②">resolve</a> <var>promise</var> with <code>false</code> and abort these steps.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise③">Resolve</a> <var>promise</var> with <code>true</code>.</p>
      </ol>
     <li data-md>
      <p>Return <var>promise</var>.</p>
    </ol>
   </div>
   <p>Calling <code class="idl"><a data-link-type="idl" href="#dom-xr-issessionsupported" id="ref-for-dom-xr-issessionsupported②">isSessionSupported()</a></code> MUST NOT trigger device-selection UI as this would cause many sites to display XR-specific dialogs early in the document lifecycle without user activation. Additionally, calling <code class="idl"><a data-link-type="idl" href="#dom-xr-issessionsupported" id="ref-for-dom-xr-issessionsupported③">isSessionSupported()</a></code> MUST NOT interfere with any running XR applications on the system, and MUST NOT cause XR-related applications to launch such as system trays or storefronts.</p>
   <div class="example" id="example-787228f4">
    <a class="self-link" href="#example-787228f4"></a> The following code checks to see if <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr">immersive-vr</a></code> sessions are supported. 
<pre class="highlight">navigator<c- p>.</c->xr<c- p>.</c->isSessionSupported<c- p>(</c-><c- t>'immersive-vr'</c-><c- p>).</c->then<c- p>((</c->supported<c- p>)</c-> <c- p>=></c-> <c- p>{</c->
  <c- k>if</c-> <c- p>(</c->supported<c- p>)</c-> <c- p>{</c->
    <c- c1>// 'immersive-vr' sessions are supported.</c->
    <c- c1>// Page should advertise support to the user.</c->
  <c- p>}</c-> <c- k>else</c-> <c- p>{</c->
    <c- c1>// 'immersive-vr' sessions are not supported.</c->
  <c- p>}</c->
<c- p>}</c->
</pre>
   </div>
   <p>The <code class="idl"><a data-link-type="idl" href="#xr" id="ref-for-xr⑥">XR</a></code> object has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="pending-immersive-session">pending immersive session</dfn> boolean, which MUST be initially <code>false</code>, an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="active-immersive-session">active immersive session</dfn>, which MUST be initially <code>null</code>, and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-inline-sessions">list of inline sessions</dfn>, which MUST be initially empty.</p>
   <div class="algorithm" data-algorithm="request-session">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XR" data-dfn-type="method" data-export data-lt="requestSession(mode, options)|requestSession(mode)" id="dom-xr-requestsession"><code>requestSession(<var>mode</var>, <var>options</var>)</code></dfn> method attempts to initialize an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥">XRSession</a></code> for the given <var>mode</var> if possible, entering immersive mode if necessary.</p>
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise" id="ref-for-a-new-promise①">a new Promise</a>.</p>
     <li data-md>
      <p>Let <var>immersive</var> be <code>true</code> if <var>mode</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session">immersive session</a> mode, and <code>false</code> otherwise.</p>
     <li data-md>
      <p>Check whether the session request is allowed as follows:</p>
      <dl class="switch">
       <dt>If <var>immersive</var> is <code>true</code>
       <dd>
        <ol>
         <li data-md>
          <p>Check if an <a data-link-type="dfn" href="#immersive-session-request-is-allowed" id="ref-for-immersive-session-request-is-allowed">immersive session request is allowed</a>, and if not <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①">reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror" id="ref-for-securityerror①">SecurityError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException①">DOMException</a></code> and return <var>promise</var>.</p>
         <li data-md>
          <p>If <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session">pending immersive session</a> is <code>true</code> or <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session">active immersive session</a> is not <code>null</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②">reject</a> <var>promise</var> with an "<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror">InvalidStateError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException②">DOMException</a></code> and return <var>promise</var>.</p>
         <li data-md>
          <p>Set <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session①">pending immersive session</a> to <code>true</code>.</p>
        </ol>
       <dt>Otherwise
       <dd>Check if an <a data-link-type="dfn" href="#inline-session-request-is-allowed" id="ref-for-inline-session-request-is-allowed">inline session request is allowed</a>, and if not <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③">reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror" id="ref-for-securityerror②">SecurityError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException③">DOMException</a></code> and return <var>promise</var>.
      </dl>
     <li data-md>
      <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel①">in parallel</a>:</p>
      <ol>
       <li data-md>
        <p>Choose <var>device</var> as follows:</p>
        <dl class="switch">
         <dt>If <var>immersive</var> is <code>true</code>
         <dd>
          <ol>
           <li data-md>
            <p><a data-link-type="dfn" href="#ensures-an-immersive-xr-device-is-selected" id="ref-for-ensures-an-immersive-xr-device-is-selected①">Ensure an immersive XR device is selected</a>.</p>
           <li data-md>
            <p>Set <var>device</var> to the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①①">immersive XR device</a>.</p>
          </ol>
         <dt>Otherwise
         <dd>Set <var>device</var> to the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device④">inline XR device</a>.
        </dl>
       <li data-md>
        <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①">Queue a task</a> to perform the following steps:</p>
        <ol>
         <li data-md>
          <p>If <var>device</var> is <code>null</code> or <var>device</var>’s <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes②">list of supported modes</a> does not <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain④">contain</a> <var>mode</var>, run the following steps:</p>
          <ol>
           <li data-md>
            <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④">Reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notsupportederror" id="ref-for-notsupportederror">NotSupportedError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException④">DOMException</a></code>.</p>
           <li data-md>
            <p>If <var>immersive</var> is <code>true</code>, set <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session②">pending immersive session</a> to <code>false</code>.</p>
           <li data-md>
            <p>Abort these steps.</p>
          </ol>
         <li data-md>
          <p>Let <var>session</var> be a new <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦">XRSession</a></code> object.</p>
         <li data-md>
          <p><a data-link-type="dfn" href="#initialize-the-session" id="ref-for-initialize-the-session">Initialize the session</a> with <var>session</var>, <var>mode</var>, and <var>device</var>.</p>
         <li data-md>
          <p><a data-link-type="dfn" href="#resolve-the-requested-features" id="ref-for-resolve-the-requested-features">Resolve the requested features</a> given by <var>options</var>’ <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures">requiredFeatures</a></code> and <var>options</var>’ <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures">optionalFeatures</a></code> values for <var>session</var>, and let <var>resolved</var> be the returned value.</p>
         <li data-md>
          <p>If <var>resolved</var> is <code>false</code>, run the following steps:</p>
          <ol>
           <li data-md>
            <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤">Reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notsupportederror" id="ref-for-notsupportederror①">NotSupportedError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException⑤">DOMException</a></code>.</p>
           <li data-md>
            <p>If <var>immersive</var> is <code>true</code>, set <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session③">pending immersive session</a> to <code>false</code>.</p>
           <li data-md>
            <p>Abort these steps.</p>
          </ol>
         <li data-md>
          <p>Potentially set the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session①">active immersive session</a> as follows:</p>
          <dl class="switch">
           <dt> If <var>immersive</var> is <code>true</code> 
           <dd> Set the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session②">active immersive session</a> to <var>session</var>, and set <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session④">pending immersive session</a> to <code>false</code>. 
           <dt> Otherwise 
           <dd> Append <var>session</var> to the <a data-link-type="dfn" href="#list-of-inline-sessions" id="ref-for-list-of-inline-sessions">list of inline sessions</a>. 
          </dl>
         <li data-md>
          <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise④">Resolve</a> <var>promise</var> with <var>session</var>.</p>
        </ol>
      </ol>
     <li data-md>
      <p>Return <var>promise</var>.</p>
    </ol>
   </div>
   <div class="example" id="example-a17c6da1">
    <a class="self-link" href="#example-a17c6da1"></a> The following code attempts to retrieve an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr①">immersive-vr</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧">XRSession</a></code>. 
<pre class="highlight"><c- a>let</c-> xrSession<c- p>;</c->

navigator<c- p>.</c->xr<c- p>.</c->requestSession<c- p>(</c-><c- u>"immersive-vr"</c-><c- p>).</c->then<c- p>((</c->session<c- p>)</c-> <c- p>=></c-> <c- p>{</c->
  xrSession <c- o>=</c-> session<c- p>;</c->
<c- p>});</c->
</pre>
   </div>
   <h3 class="heading settled" data-level="3.3" id="xrsessionmode-enum"><span class="secno">3.3. </span><span class="content">XRSessionMode</span><a class="self-link" href="#xrsessionmode-enum"></a></h3>
   <p>The <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode③">XRSessionMode</a></code> enum defines the modes that an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨">XRSession</a></code> can operate in.</p>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrsessionmode"><code><c- g>XRSessionMode</c-></code></dfn> {
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline②"><c- s>"inline"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr②"><c- s>"immersive-vr"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-immersive-ar" id="ref-for-dom-xrsessionmode-immersive-ar"><c- s>"immersive-ar"</c-></a>
};
</pre>
   <ul>
    <li data-md>
     <p>A session mode of <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionMode" data-dfn-type="enum-value" data-export data-lt="&quot;inline&quot;|inline" id="dom-xrsessionmode-inline"><code>inline</code></dfn> indicates that the session’s output will be shown as an element in the HTML document. <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline③">inline</a></code> session content MUST be displayed in mono (i.e., with a single <a data-link-type="dfn" href="#view" id="ref-for-view①">view</a>). It MAY allow for <a data-link-type="dfn" href="#viewer" id="ref-for-viewer">viewer</a> tracking. User agents MUST allow <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline④">inline</a></code> sessions to be created.</p>
    <li data-md>
     <p>A session mode of <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionMode" data-dfn-type="enum-value" data-export data-lt="&quot;immersive-vr&quot;|immersive-vr" id="dom-xrsessionmode-immersive-vr"><code>immersive-vr</code></dfn> indicates that the session’s output will be given <a data-link-type="dfn" href="#exclusive-access" id="ref-for-exclusive-access">exclusive access</a> to the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①②">immersive XR device</a> display and that content <b>is not</b> intended to be integrated with the user’s environment.</p>
    <li data-md>
     <p>The behavior of the <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionMode" data-dfn-type="enum-value" data-export data-lt="&quot;immersive-ar&quot;|immersive-ar" id="dom-xrsessionmode-immersive-ar"><code>immersive-ar</code></dfn> session mode is defined in the <a href="https://immersive-web.github.io/webxr-ar-module/">WebXR AR Module</a> and MUST NOT be added to the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①③">immersive XR device</a>'s <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes③">list of supported modes</a> unless the UA implements that module.</p>
   </ul>
   <p>In this document, the term <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="inline-session">inline session</dfn> is synonymous with an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑤">inline</a></code> session and the term <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="immersive-session">immersive session</dfn> refers to either an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr③">immersive-vr</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-ar" id="ref-for-dom-xrsessionmode-immersive-ar①">immersive-ar</a></code> session.</p>
   <p><a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①">Immersive sessions</a> MUST provide some level of <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①">viewer</a> tracking, and content MUST be shown at the proper scale relative to the user and/or the surrounding environment. Additionally, <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②">Immersive sessions</a> MUST be given <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="exclusive-access">exclusive access</dfn> to the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①④">immersive XR device</a>, meaning that while the <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session③">immersive session</a> is <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-visible" id="ref-for-dom-xrvisibilitystate-visible">"visible"</a></code> the HTML document is not shown on the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①⑤">immersive XR device</a>'s display, nor does content from any other source have exclusive access. <a data-link-type="dfn" href="#exclusive-access" id="ref-for-exclusive-access①">Exclusive access</a> does not prevent the user agent from overlaying its own UI, however this UI SHOULD be minimal.</p>
   <p class="note" role="note"><span>Note:</span> Future specifications or modules may expand the definition of <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session④">immersive session</a> include additional session modes.</p>
   <p class="note" role="note"><span>Note:</span> Examples of ways <a data-link-type="dfn" href="#exclusive-access" id="ref-for-exclusive-access②">exclusive access</a> may be presented include stereo content displayed on a virtual reality headset.</p>
   <p class="note" role="note"><span>Note:</span> As an example of overlaid UI, the user-agent or operating system in an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑤">immersive session</a> may show notifications over the rendered content.</p>
   <h3 class="heading settled" data-level="3.4" id="feature-dependencies"><span class="secno">3.4. </span><span class="content">Feature Dependencies</span><a class="self-link" href="#feature-dependencies"></a></h3>
   <p>Some features of an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪">XRSession</a></code> may not be universally available for a number of reasons, among which is the fact not all XR devices can support the full set of features. Another consideration is that some features expose <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information">sensitive information</a> which may require a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent">user intent</a> before functioning.</p>
   <p>Since it is a poor user experience to initialize the underlying XR platform and create an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①">XRSession</a></code> only to immediately notify the user that the applications cannot function correctly, developers can indicate <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="required-features">required features</dfn> by passing an <code class="idl"><a data-link-type="idl" href="#dictdef-xrsessioninit" id="ref-for-dictdef-xrsessioninit①">XRSessionInit</a></code> dictionary to <code class="idl"><a data-link-type="idl" href="#dom-xr-requestsession" id="ref-for-dom-xr-requestsession②">requestSession()</a></code>. This will block the creation of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②">XRSession</a></code> if any of the <a data-link-type="dfn" href="#required-features" id="ref-for-required-features">required features</a> are unavailable due to device limitations or in the absence of a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①">user intent</a> to expose <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information①">sensitive information</a> related to the feature.</p>
   <p>Additionally, developers are encouraged to design experiences which progressively enhance their functionality when run one more capable devices. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="optional-features">Optional features</dfn> which the experience does not require but will take advantage of when available must also be indicated in an <code class="idl"><a data-link-type="idl" href="#dictdef-xrsessioninit" id="ref-for-dictdef-xrsessioninit②">XRSessionInit</a></code> dictionary to ensure that <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent②">user intent</a> can be determined before enabling the feature if necessary.</p>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrsessioninit"><code><c- g>XRSessionInit</c-></code></dfn> {
  <c- b>sequence</c->&lt;<c- b>any</c->> <a class="idl-code" data-link-type="dict-member" data-type="sequence<any> " href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures①"><c- g>requiredFeatures</c-></a>;
  <c- b>sequence</c->&lt;<c- b>any</c->> <a class="idl-code" data-link-type="dict-member" data-type="sequence<any> " href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures①"><c- g>optionalFeatures</c-></a>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionInit" data-dfn-type="dict-member" data-export id="dom-xrsessioninit-requiredfeatures"><code>requiredFeatures</code></dfn> array contains any <a data-link-type="dfn" href="#required-features" id="ref-for-required-features①">Required features</a> for the experience. If any value in the list is not a recognized <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor">feature descriptor</a> the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③">XRSession</a></code> will not be created. If any feature listed in the <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures②">requiredFeatures</a></code> array is not supported by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①">XR device</a> or, if necessary, has not received a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent③">user intent</a> the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④">XRSession</a></code> will not be created.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionInit" data-dfn-type="dict-member" data-export id="dom-xrsessioninit-optionalfeatures"><code>optionalFeatures</code></dfn> array contains any <a data-link-type="dfn" href="#optional-features" id="ref-for-optional-features">Optional features</a> for the experience. If any value in the list is not a recognized <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor①">feature descriptor</a> it will be ignored. Features listed in the <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures②">optionalFeatures</a></code> array will be enabled if supported by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②">XR device</a> and, if necessary, given a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent④">user intent</a>, but will not block creation of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤">XRSession</a></code> if absent.</p>
   <p>Values given in the feature lists are considered a valid <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="feature-descriptor">feature descriptor</dfn> if the value is one of the following:</p>
   <ul>
    <li data-md>
     <p>Any <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype">XRReferenceSpaceType</a></code> enum value</p>
   </ul>
   <p>Future iterations of this specification and additional modules may expand the list of accepted <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor②">feature descriptors</a>.</p>
   <p class="note" role="note"><span>Note:</span> Features are accepted as an array of <code>any</code> values to ensure forwards compatibility. It allows unrecognized optional values to be properly ignored as new <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor③">feature descriptor</a> types are added.</p>
   <p>Depending on the <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode④">XRSessionMode</a></code> requested, certain <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor④">feature descriptors</a> are added to the <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures③">requiredFeatures</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures③">optionalFeatures</a></code> lists by default. The following table describes the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="default-features">default features</dfn> associated with each session type and feature list:</p>
   <table class="tg">
    <thead>
     <tr>
      <th>Feature
      <th>Sessions
      <th>List
    <tbody>
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer">"viewer"</a></code>
      <td><a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session">Inline sessions</a> and <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑥">immersive sessions</a>
      <td><code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures④">requiredFeatures</a></code>
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local">"local"</a></code>
      <td><a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑦">Immersive sessions</a>
      <td><code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures⑤">requiredFeatures</a></code>
   </table>
   <p>The combined list of <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑤">feature descriptors</a> given by the <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures⑥">requiredFeatures</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures④">optionalFeatures</a></code> are collectively considered the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="requested-features">requested features</dfn> for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑥">XRSession</a></code>.</p>
   <p>Some <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑥">feature descriptors</a>, when present in the <a data-link-type="dfn" href="#requested-features" id="ref-for-requested-features">requested features</a> list, are subject to <a href="#feature-policy">feature policy</a> and/or requirements that <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑤">user intent</a> to use the feature is well understood, via either <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent">implicit consent</a>. The following table describes the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="feature-requirements">feature requirements</dfn> that must be satisfied prior to being enabled:</p>
   <table class="tg">
    <thead>
     <tr>
      <th>Feature
      <th>Feature Policy Required
      <th>Consent Required
    <tbody>
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local①">"local"</a></code>
      <td>"xr-spatial-tracking"
      <td><a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session①">Inline sessions</a> require consent
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor">"local-floor"</a></code>
      <td>"xr-spatial-tracking"
      <td>Always requires consent
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor">"bounded-floor"</a></code>
      <td>"xr-spatial-tracking"
      <td>Always requires consent
     <tr>
      <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded">"unbounded"</a></code>
      <td>"xr-spatial-tracking"
      <td>Always requires consent
   </table>
   <p class="note" role="note"><span>Note:</span> <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local②">"local"</a></code> is always included in the <a data-link-type="dfn" href="#requested-features" id="ref-for-requested-features①">requested features</a> of <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑧">immersive sessions</a> as a <a data-link-type="dfn" href="#default-features" id="ref-for-default-features">default feature</a>, and as such <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑨">immersive sessions</a> always need to obtain <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent①">implicit consent</a>.</p>
   <p><a data-link-type="dfn" href="#requested-features" id="ref-for-requested-features②">Requested features</a> can only be enabled for a session if the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device③">XR device</a> is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="capable-of-supporting">capable of supporting</dfn> the feature, which means that the feature is known to be supported by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device④">XR device</a> in some configurations, even if the current configuration has not yet been verified as supporting the feature. The user agent MAY apply more rigorous constraints if desired in order to yield a more consistent user experience.</p>
   <p class="note" role="note"><span>Note:</span> For example, several VR devices support either configuring a safe boundary for the user to move around within or skipping boundary configuration and operating in a mode where the user is expected to stand in place. Such a device can be considered to be <a data-link-type="dfn" href="#capable-of-supporting" id="ref-for-capable-of-supporting">capable of supporting</a> <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor①">"bounded-floor"</a></code> <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace">XRReferenceSpace</a></code>s even if they are currently not configured with safety boundaries, because it’s expected that the user could configure the device appropriately if the experience required it. This is to allow user agents to avoid fully initializing the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑤">XR device</a> or waiting for the user’s environment to be recognized prior to <a data-link-type="dfn" href="#resolve-the-requested-features" id="ref-for-resolve-the-requested-features①">resolving the requested features</a> if desired. If, however, the user agent knows that the boundary state at the time the session is requested without additional initialization it may choose to reject the <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor②">"bounded-floor"</a></code> feature if the safety boundary not already configured.</p>
   <div class="algorithm" data-algorithm="resolve-features">
    <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="resolve-the-requested-features">resolve the requested features</dfn> given <var>requiredFeatures</var> and <var>optionalFeatures</var> for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑦">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>consentRequired</var> be an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list④">list</a> of <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString">DOMString</a></code>.</p>
     <li data-md>
      <p>Let <var>consentOptional</var> be an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑤">list</a> of <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString①">DOMString</a></code>.</p>
     <li data-md>
      <p>Add every <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑦">feature descriptor</a> in the <a data-link-type="dfn" href="#default-features" id="ref-for-default-features①">default features</a> table associated with <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode">mode</a> to the indicated feature list if it is not already present.</p>
     <li data-md>
      <p>For each <var>feature</var> in <var>requiredFeatures</var> perform the following steps:</p>
      <ol>
       <li data-md>
        <p>If <var>feature</var> is not a valid <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑧">feature descriptor</a>, return <code>false</code>.</p>
       <li data-md>
        <p>If the requesting document’s origin is not allowed to use any <a href="#feature-policy">feature policy</a> required by <var>feature</var> as indicated by the <a data-link-type="dfn" href="#feature-requirements" id="ref-for-feature-requirements">feature requirements</a> table, return <code>false</code>.</p>
       <li data-md>
        <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑥">XR device</a> is not <a data-link-type="dfn" href="#capable-of-supporting" id="ref-for-capable-of-supporting①">capable of supporting</a> the functionality described by <var>feature</var> or the user agent has otherwise determined to reject the feature, return <code>false</code>.</p>
       <li data-md>
        <p>If the functionality described by <var>feature</var> requires <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent②">explicit consent</a>, append it to <var>consentRequired</var>.</p>
       <li data-md>
        <p>Else append <var>feature</var> to <var>session</var>’s <a data-link-type="dfn" href="#xrsession-list-of-enabled-features" id="ref-for-xrsession-list-of-enabled-features">list of enabled features</a>.</p>
      </ol>
     <li data-md>
      <p>For each <var>feature</var> in <var>optionalFeatures</var> perform the following steps:</p>
      <ol>
       <li data-md>
        <p>If <var>feature</var> is not a valid <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑨">feature descriptor</a>, continue to the next entry.</p>
       <li data-md>
        <p>If the requesting document’s origin is not allowed to use any <a href="#feature-policy">feature policy</a> required by <var>feature</var> as indicated by the <a data-link-type="dfn" href="#feature-requirements" id="ref-for-feature-requirements①">feature requirements</a> table, continue to the next entry.</p>
       <li data-md>
        <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑦">XR device</a> is not <a data-link-type="dfn" href="#capable-of-supporting" id="ref-for-capable-of-supporting②">capable of supporting</a> the functionality described by <var>feature</var> or the user agent has otherwise determined to reject the feature, continue to the next entry.</p>
       <li data-md>
        <p>If the functionality described by <var>feature</var> requires <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent③">explicit consent</a>, append it to <var>consentOptional</var>.</p>
       <li data-md>
        <p>Else append <var>feature</var> to <var>session</var>’s <a data-link-type="dfn" href="#xrsession-list-of-enabled-features" id="ref-for-xrsession-list-of-enabled-features①">list of enabled features</a>.</p>
      </ol>
     <li data-md>
      <p>If <var>consentRequired</var> or <var>consentOptional</var> are not empty, request <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent④">explicit consent</a> to use the functionality described by those features.</p>
     <li data-md>
      <p>For each <var>feature</var> in <var>consentRequired</var> perform the following steps:</p>
      <ol>
       <li data-md>
        <p>If a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑥">user intent</a> to enable <var>feature</var> has not been given, return <code>false</code>.</p>
       <li data-md>
        <p>Else append <var>feature</var> to <var>session</var>’s <a data-link-type="dfn" href="#xrsession-list-of-enabled-features" id="ref-for-xrsession-list-of-enabled-features②">list of enabled features</a>.</p>
      </ol>
     <li data-md>
      <p>For each <var>feature</var> in <var>consentOptional</var> perform the following steps:</p>
      <ol>
       <li data-md>
        <p>If a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑦">user intent</a> to enable <var>feature</var> has not been given, continue to the next entry.</p>
       <li data-md>
        <p>Else append <var>feature</var> to <var>session</var>’s <a data-link-type="dfn" href="#xrsession-list-of-enabled-features" id="ref-for-xrsession-list-of-enabled-features③">list of enabled features</a>.</p>
      </ol>
     <li data-md>
      <p>Return <code>true</code></p>
    </ol>
   </div>
   <h2 class="heading settled" data-level="4" id="session"><span class="secno">4. </span><span class="content">Session</span><a class="self-link" href="#session"></a></h2>
   <h3 class="heading settled" data-level="4.1" id="xrsession-interface"><span class="secno">4.1. </span><span class="content">XRSession</span><a class="self-link" href="#xrsession-interface"></a></h3>
   <p>Any interaction with XR hardware is done via an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑧">XRSession</a></code> object, which can only be retrieved by calling <code class="idl"><a data-link-type="idl" href="#dom-xr-requestsession" id="ref-for-dom-xr-requestsession③">requestSession()</a></code> on the <code class="idl"><a data-link-type="idl" href="#xr" id="ref-for-xr⑦">XR</a></code> object. Once a session has been successfully acquired, it can be used to <code class="idl"><a data-link-type="idl" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose">poll the viewer pose</a></code>, query information about the user’s environment, and present imagery to the user.</p>
   <p>The user agent, when possible, <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="should-not-initialize-device-tracking">SHOULD NOT initialize device tracking</dfn> or rendering capabilities until an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑨">XRSession</a></code> has been acquired. This is to prevent unwanted side effects of engaging the XR systems when they’re not actively being used, such as increased battery usage or related utility applications from appearing when first navigating to a page that only wants to test for the presence of XR hardware in order to advertise XR features. Not all XR platforms offer ways to detect the hardware’s presence without initializing tracking, however, so this is only a strong recommendation.</p>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrvisibilitystate"><code><c- g>XRVisibilityState</c-></code></dfn> {
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-visible" id="ref-for-dom-xrvisibilitystate-visible①"><c- s>"visible"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-visible-blurred" id="ref-for-dom-xrvisibilitystate-visible-blurred"><c- s>"visible-blurred"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden"><c- s>"hidden"</c-></a>,
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext②"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrsession"><code><c- g>XRSession</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget①"><c- n>EventTarget</c-></a> {
  // Attributes
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-xrvisibilitystate" id="ref-for-enumdef-xrvisibilitystate"><c- n>XRVisibilityState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRVisibilityState" href="#dom-xrsession-visibilitystate" id="ref-for-dom-xrsession-visibilitystate"><c- g>visibilityState</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrenderstate" id="ref-for-xrrenderstate"><c- n>XRRenderState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRenderState" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate"><c- g>renderState</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray"><c- n>XRInputSourceArray</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSourceArray" href="#dom-xrsession-inputsources" id="ref-for-dom-xrsession-inputsources"><c- g>inputSources</c-></a>;

  // Methods
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-xrsession-updaterenderstate" id="ref-for-dom-xrsession-updaterenderstate"><c- g>updateRenderState</c-></a>(<c- b>optional</c-> <a class="n" data-link-type="idl-name" href="#dictdef-xrrenderstateinit" id="ref-for-dictdef-xrrenderstateinit"><c- n>XRRenderStateInit</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/updateRenderState(state), XRSession/updateRenderState()" data-dfn-type="argument" data-export id="dom-xrsession-updaterenderstate-state-state"><code><c- g>state</c-></code><a class="self-link" href="#dom-xrsession-updaterenderstate-state-state"></a></dfn> = {});
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#NewObject" id="ref-for-NewObject①"><c- g>NewObject</c-></a>] <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace①"><c- n>XRReferenceSpace</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsession-requestreferencespace" id="ref-for-dom-xrsession-requestreferencespace"><c- g>requestReferenceSpace</c-></a>(<a class="n" data-link-type="idl-name" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype①"><c- n>XRReferenceSpaceType</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/requestReferenceSpace(type)" data-dfn-type="argument" data-export id="dom-xrsession-requestreferencespace-type-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrsession-requestreferencespace-type-type"></a></dfn>);

  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long"><c- b>long</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe"><c- g>requestAnimationFrame</c-></a>(<a class="n" data-link-type="idl-name" href="#callbackdef-xrframerequestcallback" id="ref-for-callbackdef-xrframerequestcallback"><c- n>XRFrameRequestCallback</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/requestAnimationFrame(callback)" data-dfn-type="argument" data-export id="dom-xrsession-requestanimationframe-callback-callback"><code><c- g>callback</c-></code><a class="self-link" href="#dom-xrsession-requestanimationframe-callback-callback"></a></dfn>);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-xrsession-cancelanimationframe" id="ref-for-dom-xrsession-cancelanimationframe"><c- g>cancelAnimationFrame</c-></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long①"><c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/cancelAnimationFrame(handle)" data-dfn-type="argument" data-export id="dom-xrsession-cancelanimationframe-handle-handle"><code><c- g>handle</c-></code><a class="self-link" href="#dom-xrsession-cancelanimationframe-handle-handle"></a></dfn>);

  <c- b>Promise</c->&lt;<c- b>void</c->> <a class="idl-code" data-link-type="method" href="#dom-xrsession-end" id="ref-for-dom-xrsession-end"><c- g>end</c-></a>();

  // Events
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onend" id="ref-for-dom-xrsession-onend"><c- g>onend</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler②"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-oninputsourceschange" id="ref-for-dom-xrsession-oninputsourceschange"><c- g>oninputsourceschange</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler③"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselect" id="ref-for-dom-xrsession-onselect"><c- g>onselect</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler④"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselectstart" id="ref-for-dom-xrsession-onselectstart"><c- g>onselectstart</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑤"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselectend" id="ref-for-dom-xrsession-onselectend"><c- g>onselectend</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑥"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueeze" id="ref-for-dom-xrsession-onsqueeze"><c- g>onsqueeze</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑦"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueezestart" id="ref-for-dom-xrsession-onsqueezestart"><c- g>onsqueezestart</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑧"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueezeend" id="ref-for-dom-xrsession-onsqueezeend"><c- g>onsqueezeend</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑨"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onvisibilitychange" id="ref-for-dom-xrsession-onvisibilitychange"><c- g>onvisibilitychange</c-></a>;
};
</pre>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⓪">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-mode">mode</dfn>, which is one of the values of <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode⑤">XRSessionMode</a></code>.</p>
   <div class="algorithm" data-algorithm="initialize-session">
    <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-the-session">initialize the session</dfn>, given <var>session</var>, <var>mode</var>, and <var>device</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Set <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode①">mode</a> to <var>mode</var>.</p>
     <li data-md>
      <p>Set <var>session</var>’s <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑧">XR device</a> to <var>device</var>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#initialize-the-render-state" id="ref-for-initialize-the-render-state">Initialize the render state</a>.</p>
     <li data-md>
      <p>If no other features of the user agent have done so already, perform the necessary platform-specific steps to initialize the device’s tracking and rendering capabilities, including showing any necessary instructions to the user.</p>
    </ol>
    <p class="note" role="note"><span>Note:</span> Some devices require additional user instructions for activation. For example, going into immersive mode on a phone-based headset device requires inserting the phone into the headset, and doing so on a desktop browser connected to an external headset requires wearing the headset. It is the responsibility of the user agent — not the author — to ensure any such instructions are shown.</p>
   </div>
   <p>A number of different circumstances may <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="shut-down-the-session">shut down the session</dfn>, which is permanent and irreversible. Once a session has been shut down the only way to access the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑨">XR device</a>'s tracking or rendering capabilities again is to request a new session. Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②①">XRSession</a></code> has an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="ended">ended</dfn> boolean, initially set to <code>false</code>, that indicates if it has been shut down.</p>
   <div class="algorithm" data-algorithm="shut-down-session">
    <p>When an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②②">XRSession</a></code> is shut down the following steps are run:</p>
    <ol>
     <li data-md>
      <p>Let <var>session</var> be the target <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②③">XRSession</a></code> object.</p>
     <li data-md>
      <p>Set <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended">ended</a> value to <code>true</code>.</p>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session③">active immersive session</a> is equal to <var>session</var>, set the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session④">active immersive session</a> to <code>null</code>.</p>
     <li data-md>
      <p>Remove <var>session</var> from the <a data-link-type="dfn" href="#list-of-inline-sessions" id="ref-for-list-of-inline-sessions①">list of inline sessions</a>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑥">Reject</a> any outstanding promises returned by <var>session</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①">InvalidStateError</a></code>, except for any promises returned by <code class="idl"><a data-link-type="idl" href="#dom-xrsession-end" id="ref-for-dom-xrsession-end①">end()</a></code>.</p>
     <li data-md>
      <p>If no other features of the user agent are actively using them, perform the necessary platform-specific steps to shut down the device’s tracking and rendering capabilities. This MUST include:</p>
      <ul>
       <li data-md>
        <p>Releasing <a data-link-type="dfn" href="#exclusive-access" id="ref-for-exclusive-access③">exclusive access</a> to the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⓪">XR device</a> if <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⓪">immersive session</a>.</p>
       <li data-md>
        <p>Deallocating any graphics resources acquired by <var>session</var> for presentation to the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①①">XR device</a>.</p>
       <li data-md>
        <p>Putting the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①②">XR device</a> in a state such that a different source may be able to initiate a session with the same device if <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①①">immersive session</a>.</p>
      </ul>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②">Queue a task</a> that fires an <code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent">XRSessionEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-end" id="ref-for-eventdef-xrsession-end">end</a></code> on <var>session</var>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="end-session">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-end"><code>end()</code></dfn> method provides a way to manually shut down a session. When invoked, it MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise" id="ref-for-a-new-promise②">a new Promise</a>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#shut-down-the-session" id="ref-for-shut-down-the-session②">Shut down</a> the target <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②④">XRSession</a></code> object.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p>Wait until any platform-specific steps related to shutting down the session have completed.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise⑤">Resolve</a> <var>promise</var>.</p>
      </ol>
     <li data-md>
      <p>Return <var>promise</var>.</p>
    </ol>
   </div>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑤">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-list-of-enabled-features">list of enabled features</dfn>, which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑥">list</a> of <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor①⓪">feature descriptors</a> which MUST be initially an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑦">list</a></p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑥">XRSession</a></code> has an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="active-render-state">active render state</dfn> which is a new <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate①">XRRenderState</a></code>, and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="pending-render-state">pending render state</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate②">XRRenderState</a></code> which is initially <code>null</code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-renderstate"><code>renderState</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑦">XRSession</a></code>'s <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state">active render state</a>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑧">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="minimum-inline-field-of-view">minimum inline field of view</dfn> and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="maximum-inline-field-of-view">maximum inline field of view</dfn>, defined in radians. The values MUST be determined by the user agent and MUST fall in the range of <code>0</code> to <code>PI</code>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑨">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="minimum-near-clip-plane">minimum near clip plane</dfn> and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="maximum-far-clip-plane">maximum far clip plane</dfn>, defined in meters. The values MUST be determined by the user agent and MUST be non-negative. The <a data-link-type="dfn" href="#minimum-near-clip-plane" id="ref-for-minimum-near-clip-plane">minimum near clip plane</a> SHOULD be less than <code>0.1</code>. The <a data-link-type="dfn" href="#maximum-far-clip-plane" id="ref-for-maximum-far-clip-plane">maximum far clip plane</a> SHOULD be greater than <code>1000.0</code> (and MAY be infinite).</p>
   <div class="algorithm" data-algorithm="update-render-state">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export data-lt="updateRenderState(state)|updateRenderState()|updateRenderState(newState)" id="dom-xrsession-updaterenderstate"><code>updateRenderState(<var>newState</var>)</code></dfn> method queues an update to the <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state①">active render state</a> to be applied on the next frame. Unset fields of the <code class="idl"><a data-link-type="idl" href="#dictdef-xrrenderstateinit" id="ref-for-dictdef-xrrenderstateinit①">XRRenderStateInit</a></code> <var>newState</var> passed to this method will not be changed.</p>
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>session</var> be the target <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⓪">XRSession</a></code>.</p>
     <li data-md>
      <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended①">ended</a> value is <code>true</code>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror②">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-baselayer" id="ref-for-dom-xrrenderstateinit-baselayer">baseLayer</a></code>'s was created with an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③①">XRSession</a></code> other than <var>session</var>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror③">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-inlineverticalfieldofview" id="ref-for-dom-xrrenderstateinit-inlineverticalfieldofview">inlineVerticalFieldOfView</a></code> is set and <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①②">immersive session</a>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror④">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>Let <var>activeState</var> be <var>session</var>’s <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state②">active render state</a>.</p>
     <li data-md>
      <p>If <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state">pending render state</a> is <code>null</code>, set it to a copy of <var>activeState</var>.</p>
     <li data-md>
      <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthnear" id="ref-for-dom-xrrenderstateinit-depthnear">depthNear</a></code> value is set, set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state①">pending render state</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear">depthNear</a></code> to <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthnear" id="ref-for-dom-xrrenderstateinit-depthnear①">depthNear</a></code>.</p>
     <li data-md>
      <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthfar" id="ref-for-dom-xrrenderstateinit-depthfar">depthFar</a></code> value is set, set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state②">pending render state</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar">depthFar</a></code> to <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthfar" id="ref-for-dom-xrrenderstateinit-depthfar①">depthFar</a></code>.</p>
     <li data-md>
      <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-inlineverticalfieldofview" id="ref-for-dom-xrrenderstateinit-inlineverticalfieldofview①">inlineVerticalFieldOfView</a></code> is set, set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state③">pending render state</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview">inlineVerticalFieldOfView</a></code> to <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-inlineverticalfieldofview" id="ref-for-dom-xrrenderstateinit-inlineverticalfieldofview②">inlineVerticalFieldOfView</a></code>.</p>
     <li data-md>
      <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-baselayer" id="ref-for-dom-xrrenderstateinit-baselayer①">baseLayer</a></code> is set, set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state④">pending render state</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer">baseLayer</a></code> to <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-baselayer" id="ref-for-dom-xrrenderstateinit-baselayer②">baseLayer</a></code>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="apply-pending-render-state">
    <p>When requested, the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③②">XRSession</a></code> MUST <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="apply-the-pending-render-state">apply the pending render state</dfn> by running the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>session</var> be the target <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③③">XRSession</a></code>.</p>
     <li data-md>
      <p>Let <var>activeState</var> be <var>session</var>’s <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state③">active render state</a>.</p>
     <li data-md>
      <p>Let <var>newState</var> be <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state⑤">pending render state</a>.</p>
     <li data-md>
      <p>Set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state⑥">pending render state</a> to <code>null</code>.</p>
     <li data-md>
      <p>Set <var>activeState</var> to <var>newState</var>.</p>
     <li data-md>
      <p>If <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview①">inlineVerticalFieldOfView</a></code> is less than <var>session</var>’s <a data-link-type="dfn" href="#minimum-inline-field-of-view" id="ref-for-minimum-inline-field-of-view">minimum inline field of view</a> set <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview②">inlineVerticalFieldOfView</a></code> to <var>session</var>’s <a data-link-type="dfn" href="#minimum-inline-field-of-view" id="ref-for-minimum-inline-field-of-view①">minimum inline field of view</a>.</p>
     <li data-md>
      <p>If <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview③">inlineVerticalFieldOfView</a></code> is greater than <var>session</var>’s <a data-link-type="dfn" href="#maximum-inline-field-of-view" id="ref-for-maximum-inline-field-of-view">maximum inline field of view</a> set <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview④">inlineVerticalFieldOfView</a></code> to <var>session</var>’s <a data-link-type="dfn" href="#maximum-inline-field-of-view" id="ref-for-maximum-inline-field-of-view①">maximum inline field of view</a>.</p>
     <li data-md>
      <p>If <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear①">depthNear</a></code> is less than <var>session</var>’s <a data-link-type="dfn" href="#minimum-near-clip-plane" id="ref-for-minimum-near-clip-plane①">minimum near clip plane</a> set <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear②">depthNear</a></code> to <var>session</var>’s <a data-link-type="dfn" href="#minimum-near-clip-plane" id="ref-for-minimum-near-clip-plane②">minimum near clip plane</a>.</p>
     <li data-md>
      <p>If <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar①">depthFar</a></code> is less than <var>session</var>’s <a data-link-type="dfn" href="#maximum-far-clip-plane" id="ref-for-maximum-far-clip-plane①">maximum far clip plane</a> set <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar②">depthFar</a></code> to <var>session</var>’s <a data-link-type="dfn" href="#maximum-far-clip-plane" id="ref-for-maximum-far-clip-plane②">maximum far clip plane</a>.</p>
     <li data-md>
      <p>Let <var>baseLayer</var> be <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer①">baseLayer</a></code>.</p>
     <li data-md>
      <p>Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-composition-disabled" id="ref-for-xrrenderstate-composition-disabled">composition disabled</a> and <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas">output canvas</a> as follows:</p>
      <dl class="switch">
       <dt> If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode②">mode</a> is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑥">"inline"</a></code> and <var>baseLayer</var> is an instance of an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer">XRWebGLLayer</a></code> with <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled">composition disabled</a> set to <code>true</code> 
       <dd> Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-composition-disabled" id="ref-for-xrrenderstate-composition-disabled①">composition disabled</a> boolean to <code>true</code>. 
       <dd> Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas①">output canvas</a> to <var>baseLayer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context">context</a>'s <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext">canvas</a></code>. 
       <dt> Otherwise 
       <dd> Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-composition-disabled" id="ref-for-xrrenderstate-composition-disabled②">composition disabled</a> boolean to <code>false</code>. 
       <dd> Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas②">output canvas</a> to <code>null</code>. 
      </dl>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="request-reference-space">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-requestreferencespace"><code>requestReferenceSpace(<var>type</var>)</code></dfn> method constructs a new <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②">XRReferenceSpace</a></code> of a given <var>type</var>, if possible. 
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise" id="ref-for-a-new-promise③">a new Promise</a>.</p>
     <li data-md>
      <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel②">in parallel</a>:</p>
      <ol>
       <li data-md>
        <p><a data-link-type="dfn" href="#create-a-reference-space" id="ref-for-create-a-reference-space">Create a reference space</a>, <var>referenceSpace</var>, with the <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype②">XRReferenceSpaceType</a></code> <var>type</var>.</p>
       <li data-md>
        <p>If <var>referenceSpace</var> is <code>null</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑦">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notsupportederror" id="ref-for-notsupportederror②">NotSupportedError</a></code> and abort these steps.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise⑥">Resolve</a> <var>promise</var> with <var>referenceSpace</var>.</p>
      </ol>
     <li data-md>
      <p>Return <var>promise</var>.</p>
    </ol>
   </div>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③④">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-active-xr-input-sources">list of active XR input sources</dfn> (a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑧">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource">XRInputSource</a></code>) which MUST be initially an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑨">list</a>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑤">XRSession</a></code> has an <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-xr-device">XR device</dfn>, which is an <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑨">XR device</a> set at initialization.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-inputsources"><code>inputSources</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑥">XRSession</a></code>'s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources">list of active XR input sources</a>.</p>
   <p>The user agent MUST monitor any <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source">XR input source</a>s associated with the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①③">XR device</a>, including detecting when <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①">XR input source</a>s are added, removed, or changed.</p>
   <div class="algorithm" data-algorithm="on-input-source-added">
    <p>When <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-lt="add input source" data-noexport id="xrsession-add-input-source">new <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②">XR input source</a>s become available</dfn> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑦">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>added</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⓪">list</a>.</p>
     <li data-md>
      <p>For each new <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source③">XR input source</a>:</p>
      <ol>
       <li data-md>
        <p>Let <var>inputSource</var> be a new <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①">XRInputSource</a></code>.</p>
       <li data-md>
        <p>Add <var>inputSource</var> to <var>added</var>.</p>
      </ol>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task④">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-extend" id="ref-for-list-extend">Extend</a> <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①">list of active XR input sources</a> with <var>added</var>.</p>
       <li data-md>
        <p>Fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange">inputsourceschange</a></code> on <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added">added</a></code> set to <var>added</var>.</p>
      </ol>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="on-input-source-removed">
    <p>When any previously added <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-lt="remove input source" data-noexport id="xrsession-remove-input-source"><a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source④">XR input source</a>s are no longer available</dfn> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑧">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>removed</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①①">list</a>.</p>
     <li data-md>
      <p>For each <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑤">XR input source</a> that is no longer available:</p>
      <ol>
       <li data-md>
        <p>Let <var>inputSource</var> be the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②">XRInputSource</a></code> in <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources②">list of active XR input sources</a> associated with the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑥">XR input source</a>.</p>
       <li data-md>
        <p>Add <var>inputSource</var> to <var>removed</var>.</p>
      </ol>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑤">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-remove" id="ref-for-list-remove">Remove</a> each <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③">XRInputSource</a></code> in <var>removed</var> from <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources③">list of active XR input sources</a>.</p>
       <li data-md>
        <p>Fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent①">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange①">inputsourceschange</a></code> on <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed">removed</a></code> set to <var>removed</var>.</p>
      </ol>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="on-input-source-change">
    <p>When the <dfn data-dfn-for="XRSession" data-dfn-type="dfn" data-export data-lt="change input source" id="xrsession-change-input-source"><code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-handedness" id="ref-for-dom-xrinputsource-handedness">handedness</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode">targetRayMode</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles">profiles</a></code>, or presence of a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace">gripSpace</a></code> for any <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑦">XR input source</a>s change<a class="self-link" href="#xrsession-change-input-source"></a></dfn> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑨">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>added</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①②">list</a>.</p>
     <li data-md>
      <p>Let <var>removed</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①③">list</a>.</p>
     <li data-md>
      <p>For each changed <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑧">XR input source</a>:</p>
      <ol>
       <li data-md>
        <p>Let <var>oldInputSource</var> be the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource④">XRInputSource</a></code> in <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources④">list of active XR input sources</a> previously associated with the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑨">XR input source</a>.</p>
       <li data-md>
        <p>Let <var>newInputSource</var> be a new <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑤">XRInputSource</a></code>.</p>
       <li data-md>
        <p>Add <var>oldInputSource</var> to <var>removed</var>.</p>
       <li data-md>
        <p>Add <var>newInputSource</var> to <var>added</var>.</p>
      </ol>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑥">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-remove" id="ref-for-list-remove①">Remove</a> each <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑥">XRInputSource</a></code> in <var>removed</var> from <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑤">list of active XR input sources</a>.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-extend" id="ref-for-list-extend①">Extend</a> <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑥">list of active XR input sources</a> with <var>added</var>.</p>
       <li data-md>
        <p>Fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent②">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange②">inputsourceschange</a></code> on <var>session</var> with<code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added①">added</a></code> set to <var>added</var> and <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed①">removed</a></code> set to <var>removed</var>.</p>
      </ol>
    </ol>
   </div>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⓪">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-visibility-state">visibility state</dfn> value, which is an enum which MUST be set to whichever of the following values best matches the state of session.</p>
   <ul>
    <li data-md>
     <p>A state of <dfn class="dfn-paneled idl-code" data-dfn-for="XRVisibilityState" data-dfn-type="enum-value" data-export data-lt="&quot;visible&quot;|visible" id="dom-xrvisibilitystate-visible"><code>visible</code></dfn> indicates that imagery rendered by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④①">XRSession</a></code> can be seen by the user and <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe①">requestAnimationFrame()</a></code> callbacks are processed at the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①④">XR device</a>'s native refresh rate. Input is processed by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④②">XRSession</a></code> normally.</p>
    <li data-md>
     <p>A state of <dfn class="dfn-paneled idl-code" data-dfn-for="XRVisibilityState" data-dfn-type="enum-value" data-export data-lt="&quot;visible-blurred&quot;|visible-blurred" id="dom-xrvisibilitystate-visible-blurred"><code>visible-blurred</code></dfn> indicates that imagery rendered by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④③">XRSession</a></code> may be seen by the user, but is not the primary focus. <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe②">requestAnimationFrame()</a></code> callbacks MAY be <a data-link-type="dfn" href="#throttling" id="ref-for-throttling">throttled</a>. Input is not processed by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④④">XRSession</a></code>.</p>
    <li data-md>
     <p>A state of <dfn class="dfn-paneled idl-code" data-dfn-for="XRVisibilityState" data-dfn-type="enum-value" data-export data-lt="&quot;hidden&quot;|hidden" id="dom-xrvisibilitystate-hidden"><code>hidden</code></dfn> indicates that imagery rendered by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑤">XRSession</a></code> cannot be seen by the user. <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe③">requestAnimationFrame()</a></code> callbacks will not be processed until the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state">visibility state</a> changes. Input is not processed by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑥">XRSession</a></code>.</p>
   </ul>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-visibilitystate"><code>visibilityState</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑦">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state①">visibility state</a>. The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onvisibilitychange"><code>onvisibilitychange</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes①">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-visibilitychange" id="ref-for-eventdef-xrsession-visibilitychange">visibilitychange</a></code> event type.</p>
   <p>The <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state②">visibility state</a> MAY be changed by the user agent at any time other than during the processing of an <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame">XR animation frame</a>, and the user agent SHOULD monitor the XR platform when possible to observe when session visibility has been affected external to the user agent and update the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state③">visibility state</a> accordingly.</p>
   <p class="note" role="note"><span>Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑧">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state④">visibility state</a> does not necessarily imply the visibility of the HTML document. Depending on the system configuration the page may continue to be visible while an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①③">immersive session</a> is active. (For example, a headset connected to a PC may continue to display the page on the monitor while the headset is viewing content from an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①④">immersive session</a>.) Developers should continue to rely on the [Page Visibility API](https://w3c.github.io/page-visibility/) to determine page visibility.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑨">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-viewer-reference-space">viewer reference space</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③">XRReferenceSpace</a></code> of type <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer①">"viewer"</a></code> with an <a data-link-type="dfn" href="#identity-transform" id="ref-for-identity-transform">identity transform</a> <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset">origin offset</a>. The <a data-link-type="dfn" href="#xrsession-viewer-reference-space" id="ref-for-xrsession-viewer-reference-space">viewer reference space</a> has a <dfn class="dfn-paneled" data-dfn-for="XRSession/viewer reference space" data-dfn-type="dfn" data-noexport id="xrsession-viewer-reference-space-list-of-views">list of views</dfn>, which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①④">list</a> of <a data-link-type="dfn" href="#view" id="ref-for-view②">view</a>s corresponding to the views provided by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑤">XR device</a>. If the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⓪">XRSession</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate①">renderState</a></code>'s <a data-link-type="dfn" href="#xrrenderstate-composition-disabled" id="ref-for-xrrenderstate-composition-disabled③">composition disabled</a> boolean is set to <code>true</code> the <a data-link-type="dfn" href="#xrsession-viewer-reference-space-list-of-views" id="ref-for-xrsession-viewer-reference-space-list-of-views">list of views</a> MUST contain a single <a data-link-type="dfn" href="#view" id="ref-for-view③">view</a>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onend"><code>onend</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes②">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-end" id="ref-for-eventdef-xrsession-end①">end</a></code> event type.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-oninputsourceschange"><code>oninputsourceschange</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes③">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange③">inputsourceschange</a></code> event type.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onselectstart"><code>onselectstart</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes④">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-selectstart" id="ref-for-eventdef-xrsession-selectstart">selectstart</a></code> event type.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onselectend"><code>onselectend</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑤">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend">selectend</a></code> event type.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onselect"><code>onselect</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑥">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select">select</a></code> event type.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onsqueezestart"><code>onsqueezestart</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑦">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeezestart" id="ref-for-eventdef-xrsession-squeezestart">squeezestart</a></code> event type.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onsqueezeend"><code>onsqueezeend</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑧">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeezeend" id="ref-for-eventdef-xrsession-squeezeend">squeezeend</a></code> event type.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onsqueeze"><code>onsqueeze</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑨">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeeze" id="ref-for-eventdef-xrsession-squeeze">squeeze</a></code> event type.</p>
   <h3 class="heading settled" data-level="4.2" id="xrrenderstate-interface"><span class="secno">4.2. </span><span class="content">XRRenderState</span><a class="self-link" href="#xrrenderstate-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate③">XRRenderState</a></code> represents a set of configurable values which affect how an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤①">XRSession</a></code>'s output is composited. The <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state④">active render state</a> for a given <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤②">XRSession</a></code> can only change between frame boundaries, and updates can be queued up via <code class="idl"><a data-link-type="idl" href="#dom-xrsession-updaterenderstate" id="ref-for-dom-xrsession-updaterenderstate①">updateRenderState()</a></code>.</p>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrrenderstateinit"><code><c- g>XRRenderStateInit</c-></code></dfn> {
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="double " id="dom-xrrenderstateinit-depthnear"><code><c- g>depthNear</c-></code></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double①"><c- b>double</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="double " id="dom-xrrenderstateinit-depthfar"><code><c- g>depthFar</c-></code></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double②"><c- b>double</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="double " id="dom-xrrenderstateinit-inlineverticalfieldofview"><code><c- g>inlineVerticalFieldOfView</c-></code></dfn>;
  <a class="n" data-link-type="idl-name" href="#xrwebgllayer" id="ref-for-xrwebgllayer①"><c- n>XRWebGLLayer</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="XRWebGLLayer? " id="dom-xrrenderstateinit-baselayer"><code><c- g>baseLayer</c-></code></dfn>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext③"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed②"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrrenderstate"><code><c- g>XRRenderState</c-></code></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double③"><c- b>double</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="double" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear③"><c- g>depthNear</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double④"><c- b>double</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="double" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar③"><c- g>depthFar</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double⑤"><c- b>double</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="double?" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑤"><c- g>inlineVerticalFieldOfView</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrwebgllayer" id="ref-for-xrwebgllayer②"><c- n>XRWebGLLayer</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRWebGLLayer?" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer②"><c- g>baseLayer</c-></a>;
};
</pre>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate④">XRRenderState</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRRenderState" data-dfn-type="dfn" data-noexport id="xrrenderstate-output-canvas">output canvas</dfn>, which is an <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/canvas.html#htmlcanvaselement" id="ref-for-htmlcanvaselement">HTMLCanvasElement</a></code> initially set to <code>null</code>. The <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas③">output canvas</a> is the DOM element that will display any content rendered for an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑦">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤③">XRSession</a></code>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑤">XRRenderState</a></code> also has <dfn class="dfn-paneled" data-dfn-for="XRRenderState" data-dfn-type="dfn" data-noexport id="xrrenderstate-composition-disabled">composition disabled</dfn> boolean, which is initially <code>false</code>. The <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑥">XRRenderState</a></code> is considered to be have <a data-link-type="dfn" href="#xrrenderstate-composition-disabled" id="ref-for-xrrenderstate-composition-disabled④">composition disabled</a> if rendering commands performed for an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑧">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤④">XRSession</a></code> are executed in such a way that they are directly displayed into <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas④">output canvas</a>, rather than first being processed by the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor">XR Compositor</a>.</p>
   <p class="note" role="note"><span>Note:</span> At this point the <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑦">XRRenderState</a></code> will only have an <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑤">output canvas</a> if it has <a data-link-type="dfn" href="#xrrenderstate-composition-disabled" id="ref-for-xrrenderstate-composition-disabled⑤">composition disabled</a>, but future versions of the specification are likely to introduce methods for setting <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑥">output canvas</a>' that support more advanced uses like mirroring and layer compositing that will require composition.</p>
   <div class="algorithm" data-algorithm="initialize-renderstate">
    <p>When an <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑧">XRRenderState</a></code> object is created for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑤">XRSession</a></code> <var>session</var>, the user agent MUST <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-the-render-state">initialize the render state</dfn> by running the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>state</var> be the newly created <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑨">XRRenderState</a></code> object.</p>
     <li data-md>
      <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear④">depthNear</a></code> to <code>0.1</code>.</p>
     <li data-md>
      <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar④">depthFar</a></code> to <code>1000.0</code>.</p>
     <li data-md>
      <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑥">inlineVerticalFieldOfView</a></code> as follows:</p>
      <dl class="switch">
       <dt> If <var>session</var> is an <a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session②">inline session</a> 
       <dd> Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑦">inlineVerticalFieldOfView</a></code> to <code>PI * 0.5</code>. 
       <dt> Else 
       <dd> Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑧">inlineVerticalFieldOfView</a></code> to <code>null</code>. 
      </dl>
     <li data-md>
      <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer③">baseLayer</a></code> to <code>null</code>.</p>
    </ol>
   </div>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderState" data-dfn-type="attribute" data-export id="dom-xrrenderstate-depthnear"><code>depthNear</code></dfn> attribute defines the distance, in meters, of the near clip plane from the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer②">viewer</a>. The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderState" data-dfn-type="attribute" data-export id="dom-xrrenderstate-depthfar"><code>depthFar</code></dfn> attribute defines the distance, in meters, of the far clip plane from the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer③">viewer</a>.</p>
   <p><code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear⑤">depthNear</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar⑤">depthFar</a></code> are used in the computation of the <code class="idl"><a data-link-type="idl" href="#dom-xrview-projectionmatrix" id="ref-for-dom-xrview-projectionmatrix">projectionMatrix</a></code> of <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview">XRView</a></code>s. When the <code class="idl"><a data-link-type="idl" href="#dom-xrview-projectionmatrix" id="ref-for-dom-xrview-projectionmatrix①">projectionMatrix</a></code> is used during rendering, only geometry with a distance to the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer④">viewer</a> that falls between <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear⑥">depthNear</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar⑥">depthFar</a></code> will be drawn. They also determine how the values of an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer③">XRWebGLLayer</a></code> depth buffer are interpreted. <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear⑦">depthNear</a></code> MAY be greater than <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar⑦">depthFar</a></code>.</p>
   <p class="note" role="note"><span>Note:</span> Typically when constructing a perspective projection matrix for rendering the developer specifies the viewing frustum and the near and far clip planes. When displaying to an <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①⑥">immersive XR device</a> the correct viewing frustum is determined by some combination of the optics, displays, and cameras being used. The near and far clip planes, however, may be modified by the application since the appropriate values depend on the type of content being rendered.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderState" data-dfn-type="attribute" data-export id="dom-xrrenderstate-inlineverticalfieldofview"><code>inlineVerticalFieldOfView</code></dfn> attribute defines the default vertical field of view in radians used when computing projection matrices for <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑨">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑥">XRSession</a></code>s. The projection matrix calculation also takes into account the aspect ratio of the <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑦">output canvas</a>. This value MUST be <code>null</code> for <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑤">immersive sessions</a>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderState" data-dfn-type="attribute" data-export id="dom-xrrenderstate-baselayer"><code>baseLayer</code></dfn> attribute defines an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer④">XRWebGLLayer</a></code> which the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①">XR compositor</a> will obtain images from.</p>
   <h3 class="heading settled" data-level="4.3" id="animation-frames"><span class="secno">4.3. </span><span class="content">Animation Frames</span><a class="self-link" href="#animation-frames"></a></h3>
   <p>The primary way an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑦">XRSession</a></code> provides information about the tracking state of the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑥">XR device</a> is via callbacks scheduled by calling <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe④">requestAnimationFrame()</a></code> on the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑧">XRSession</a></code> instance.</p>
<pre class="idl highlight def"><c- b>callback</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="callback" data-export id="callbackdef-xrframerequestcallback"><code><c- g>XRFrameRequestCallback</c-></code></dfn> = <c- b>void</c-> (<a class="n" data-link-type="idl-name" href="https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp" id="ref-for-dom-domhighrestimestamp"><c- n>DOMHighResTimeStamp</c-></a> <dfn class="idl-code" data-dfn-for="XRFrameRequestCallback" data-dfn-type="argument" data-export id="dom-xrframerequestcallback-time"><code><c- g>time</c-></code><a class="self-link" href="#dom-xrframerequestcallback-time"></a></dfn>, <a class="n" data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe"><c- n>XRFrame</c-></a> <dfn class="idl-code" data-dfn-for="XRFrameRequestCallback" data-dfn-type="argument" data-export id="dom-xrframerequestcallback-frame"><code><c- g>frame</c-></code><a class="self-link" href="#dom-xrframerequestcallback-frame"></a></dfn>);
</pre>
   <p>Each <code class="idl"><a data-link-type="idl" href="#callbackdef-xrframerequestcallback" id="ref-for-callbackdef-xrframerequestcallback①">XRFrameRequestCallback</a></code> object has a <dfn class="dfn-paneled" data-dfn-for="XRFrameRequestCallback" data-dfn-type="dfn" data-noexport id="xrframerequestcallback-cancelled">cancelled</dfn> boolean initially set to <code>false</code>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑨">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-animation-frame-callbacks">list of animation frame callbacks</dfn>, which is initially empty, and an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="animation-frame-callback-identifier">animation frame callback identifier</dfn>, which is a number which is initially zero.</p>
   <div class="algorithm" data-algorithm="request-animation-frame">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-requestanimationframe"><code>requestAnimationFrame(<var>callback</var>)</code></dfn> method queues up <var>callback</var> for being run the next time the user agent wishes to run an animation frame for the device.</p>
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>session</var> be the target <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⓪">XRSession</a></code> object.</p>
     <li data-md>
      <p>Increment <var>session</var>’s <a data-link-type="dfn" href="#animation-frame-callback-identifier" id="ref-for-animation-frame-callback-identifier">animation frame callback identifier</a> by one.</p>
     <li data-md>
      <p>Append <var>callback</var> to <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks">list of animation frame callbacks</a>, associated with <var>session</var>’s <a data-link-type="dfn" href="#animation-frame-callback-identifier" id="ref-for-animation-frame-callback-identifier①">animation frame callback identifier</a>’s current value.</p>
     <li data-md>
      <p>Return <var>session</var>’s <a data-link-type="dfn" href="#animation-frame-callback-identifier" id="ref-for-animation-frame-callback-identifier②">animation frame callback identifier</a>’s current value.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="cancel-animation-frame">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-cancelanimationframe"><code>cancelAnimationFrame(<var>handle</var>)</code></dfn> method cancels an existing animation frame callback given its <a data-link-type="dfn" href="#animation-frame-callback-identifier" id="ref-for-animation-frame-callback-identifier③">animation frame callback identifier</a> <var>handle</var>.</p>
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>session</var> be the target <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥①">XRSession</a></code> object.</p>
     <li data-md>
      <p>Find the entry in <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks①">list of animation frame callbacks</a> that is associated with the value <var>handle</var>.</p>
     <li data-md>
      <p>If there is such an entry, set its <a data-link-type="dfn" href="#xrframerequestcallback-cancelled" id="ref-for-xrframerequestcallback-cancelled">cancelled</a> boolean to <code>true</code> and remove it from <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks②">list of animation frame callbacks</a>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="run-animation-frames">
    <p>When an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥②">XRSession</a></code> <var>session</var> receives updated <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑤">viewer</a> state for timestamp <var>now</var> from the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑦">XR device</a>, it runs an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="xr-animation-frame">XR animation frame</dfn>, which MUST run the following steps regardless of if the <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks③">list of animation frame callbacks</a> is empty or not:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①">XRFrame</a></code> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time">time</a> <var>now</var> and <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session">session</a></code> <var>session</var>.</p>
     <li data-md>
      <p>If <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state⑦">pending render state</a> is not <code>null</code>, <a data-link-type="dfn" href="#apply-the-pending-render-state" id="ref-for-apply-the-pending-render-state">apply the pending render state</a>.</p>
     <li data-md>
      <p>If <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate②">renderState</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer④">baseLayer</a></code> is <code>null</code>, abort these steps.</p>
     <li data-md>
      <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode③">mode</a> is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⓪">"inline"</a></code> and <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate③">renderState</a></code>'s <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑧">output canvas</a> is <code>null</code>, abort these steps.</p>
     <li data-md>
      <p>Let <var>callbacks</var> be a list of the entries in <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks④">list of animation frame callback</a>, in the order in which they were added to the list.</p>
     <li data-md>
      <p>Set <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks⑤">list of animation frame callbacks</a> to the empty list.</p>
     <li data-md>
      <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active">active</a> boolean to <code>true</code>.</p>
     <li data-md>
      <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-animationframe" id="ref-for-xrframe-animationframe">animationFrame</a> boolean to <code>true</code>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#xrframe-apply-frame-updates" id="ref-for-xrframe-apply-frame-updates">Apply frame updates</a> for <var>frame</var>.</p>
     <li data-md>
      <p>For each entry in <var>callbacks</var>, in order:</p>
      <ol>
       <li data-md>
        <p>If the entry’s <a data-link-type="dfn" href="#xrframerequestcallback-cancelled" id="ref-for-xrframerequestcallback-cancelled①">cancelled</a> boolean is <code>true</code>, continue to the next entry.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="https://www.w3.org/TR/WebIDL-1/#es-invoking-callback-functions" id="ref-for-es-invoking-callback-functions">Invoke the Web IDL callback function</a>, passing <var>now</var> and <var>frame</var> as the  arguments</p>
       <li data-md>
        <p>If an exception is thrown, <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception" id="ref-for-report-the-exception">report the exception</a>.</p>
      </ol>
     <li data-md>
      <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active①">active</a> boolean to <code>false</code>.</p>
    </ol>
   </div>
   <p>The behavior of the <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/window-object.html#window" id="ref-for-window">Window</a></code> interface’s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe">requestAnimationFrame()</a></code> method is not changed by the presence of any active <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥③">XRSession</a></code>, nor does calling <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑤">requestAnimationFrame()</a></code> on any <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥④">XRSession</a></code> interact with <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/window-object.html#window" id="ref-for-window①">Window</a></code>'s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe①">requestAnimationFrame()</a></code> in any way. An <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session⑤">active immersive session</a> MAY affect the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#rendering-opportunity" id="ref-for-rendering-opportunity">rendering opportunity</a> of a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context">browsing context</a> if it causes the page to be obscured.</p>
   <div class="example" id="example-c523945b">
    <a class="self-link" href="#example-c523945b"></a> If an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑥">immersive session</a> prevents <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#rendering-opportunity" id="ref-for-rendering-opportunity①">rendering opportunities</a> then callbacks supplied to <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/window-object.html#window" id="ref-for-window②">Window</a></code> <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe②">requestAnimationFrame()</a></code> may not be processed while the session is active. This depends on the type of device being used and is most likely to happen depend on mobile or standalone devices where the immersive content completely obscures the HTML document. As such, developers must not rely on <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/window-object.html#window" id="ref-for-window③">Window</a></code> <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe③">requestAnimationFrame()</a></code> callbacks to schedule <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑤">XRSession</a></code> <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑥">requestAnimationFrame()</a></code> callbacks and visa-versa, even if they share the same rendering logic. Applications that do not follow this guidance may not execute properly on all platforms. A more effective pattern for applications that wish to transition between these two types of animation loops is demonstrated below: 
<pre class="highlight"><c- a>let</c-> xrSession <c- o>=</c-> <c- kc>null</c-><c- p>;</c->

<c- a>function</c-> onWindowAnimationFrame<c- p>(</c->time<c- p>)</c-> <c- p>{</c->
  window<c- p>.</c->requestAnimationFrame<c- p>(</c->onWindowAnimationFrame<c- p>);</c->

  <c- c1>// This may be called while an immersive session is running on some devices,</c->
  <c- c1>// such as a desktop with a tethered headset. To prevent two loops from</c->
  <c- c1>// rendering in parallel, skip drawing in this one until the session ends.</c->
  <c- k>if</c-> <c- p>(</c-><c- o>!</c->xrSession<c- p>)</c-> <c- p>{</c->
    renderFrame<c- p>(</c->time<c- p>,</c-> <c- kc>null</c-><c- p>);</c->
  <c- p>}</c->
<c- p>}</c->

<c- c1>// The window animation loop can be started immediately upon the page loading.</c->
window<c- p>.</c->requestAnimationFrame<c- p>(</c->onWindowAnimationFrame<c- p>);</c->

<c- a>function</c-> onXRAnimationFrame<c- p>(</c->time<c- p>,</c-> xrFrame<c- p>)</c-> <c- p>{</c->
  xrSession<c- p>.</c->requestAnimationFrame<c- p>(</c->onXRAnimationFrame<c- p>);</c->
  renderFrame<c- p>(</c->time<c- p>,</c-> xrFrame<c- p>);</c->
<c- p>}</c->

<c- a>function</c-> renderFrame<c- p>(</c->time<c- p>,</c-> xrFrame<c- p>)</c-> <c- p>{</c->
  <c- c1>// Shared rendering logic.</c->
<c- p>}</c->

<c- c1>// Assumed to be called by a user gesture event elsewhere in code.</c->
<c- a>function</c-> startXRSession<c- p>()</c-> <c- p>{</c->
  navigator<c- p>.</c->xr<c- p>.</c->requestSession<c- p>(</c-><c- t>'immersive-vr'</c-><c- p>).</c->then<c- p>((</c->session<c- p>)</c-> <c- p>=></c-> <c- p>{</c->
    xrSession <c- o>=</c-> session<c- p>;</c->
    xrSession<c- p>.</c->addEventListener<c- p>(</c-><c- t>'end'</c-><c- p>,</c-> onXRSessionEnded<c- p>);</c->
    <c- c1>// Do necessary session setup here.</c->
    <c- c1>// Begin the session’s animation loop.</c->
    xrSession<c- p>.</c->requestAnimationFrame<c- p>(</c->onXRAnimationFrame<c- p>);</c->
  <c- p>});</c->
<c- p>}</c->

<c- a>function</c-> onXRSessionEnded<c- p>()</c-> <c- p>{</c->
  xrSession <c- o>=</c-> <c- kc>null</c-><c- p>;</c->
<c- p>}</c->
</pre>
    <p>Applications which use <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①①">"inline"</a></code> sessions for rendering to the HTML document do not need to take any special steps to coordinate the animation loops, since the user agent will automatically suspend the animation loops of any <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①②">"inline"</a></code> sessions while an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑦">immersive session</a> is active.</p>
   </div>
   <h3 class="heading settled" data-level="4.4" id="compositor"><span class="secno">4.4. </span><span class="content">The XR Compositor</span><a class="self-link" href="#compositor"></a></h3>
   <p>The user agent MUST maintain an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="xr-compositor">XR Compositor</dfn> which handles presentation to the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑧">XR device</a> and frame timing. The compositor MUST use an independent rendering context whose state is isolated from that of any graphics contexts created by the document. The compositor MUST prevent the page from corrupting the compositor state or reading back content from other pages or applications. The compositor MUST also run in separate thread or processes to decouple performance of the page from the ability to present new imagery to the user at the appropriate framerate. The compositor MAY composite additional device or user agent UI over rendered content, like device menus.</p>
   <p class="note" role="note"><span>Note:</span> Future extensions to this spec may utilize the compositor to composite multiple layers coming from the same page as well.</p>
   <h2 class="heading settled" data-level="5" id="frame"><span class="secno">5. </span><span class="content">Frame Loop</span><a class="self-link" href="#frame"></a></h2>
   <h3 class="heading settled" data-level="5.1" id="xrframe-interface"><span class="secno">5.1. </span><span class="content">XRFrame</span><a class="self-link" href="#xrframe-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②">XRFrame</a></code> represents a snapshot of the state of all of the tracked objects for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑥">XRSession</a></code>. Applications can acquire an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe③">XRFrame</a></code> by calling <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑦">requestAnimationFrame()</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑦">XRSession</a></code> with an <code class="idl"><a data-link-type="idl" href="#callbackdef-xrframerequestcallback" id="ref-for-callbackdef-xrframerequestcallback②">XRFrameRequestCallback</a></code>. When the callback is called it will be passed an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe④">XRFrame</a></code>. Events which need to communicate tracking state, such as the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select①">select</a></code> event, will also provide an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑤">XRFrame</a></code>.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext④"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed③"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrframe"><code><c- g>XRFrame</c-></code></dfn> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject③"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession⑥⑧"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①"><c- g>session</c-></a>;

  <a class="n" data-link-type="idl-name" href="#xrviewerpose" id="ref-for-xrviewerpose"><c- n>XRViewerPose</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose①"><c- g>getViewerPose</c-></a>(<a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace④"><c- n>XRReferenceSpace</c-></a> <dfn class="idl-code" data-dfn-for="XRFrame/getViewerPose(referenceSpace)" data-dfn-type="argument" data-export id="dom-xrframe-getviewerpose-referencespace-referencespace"><code><c- g>referenceSpace</c-></code><a class="self-link" href="#dom-xrframe-getviewerpose-referencespace-referencespace"></a></dfn>);
  <a class="n" data-link-type="idl-name" href="#xrpose" id="ref-for-xrpose"><c- n>XRPose</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrframe-getpose" id="ref-for-dom-xrframe-getpose"><c- g>getPose</c-></a>(<a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace"><c- n>XRSpace</c-></a> <dfn class="idl-code" data-dfn-for="XRFrame/getPose(space, baseSpace)" data-dfn-type="argument" data-export id="dom-xrframe-getpose-space-basespace-space"><code><c- g>space</c-></code><a class="self-link" href="#dom-xrframe-getpose-space-basespace-space"></a></dfn>, <a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①"><c- n>XRSpace</c-></a> <dfn class="idl-code" data-dfn-for="XRFrame/getPose(space, baseSpace)" data-dfn-type="argument" data-export id="dom-xrframe-getpose-space-basespace-basespace"><code><c- g>baseSpace</c-></code><a class="self-link" href="#dom-xrframe-getpose-space-basespace-basespace"></a></dfn>);
};
</pre>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑥">XRFrame</a></code> has an <dfn class="dfn-paneled" data-dfn-for="XRFrame" data-dfn-type="dfn" data-noexport id="xrframe-active">active</dfn> boolean which is initially set to <code>false</code>, and an <dfn class="dfn-paneled" data-dfn-for="XRFrame" data-dfn-type="dfn" data-noexport id="xrframe-animationframe">animationFrame</dfn> boolean which is initially set to <code>false</code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRFrame" data-dfn-type="attribute" data-export id="dom-xrframe-session"><code>session</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑨">XRSession</a></code> that produced the <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑦">XRFrame</a></code>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑧">XRFrame</a></code> represents the state of all tracked objects for a given <dfn class="dfn-paneled" data-dfn-for="XRFrame" data-dfn-type="dfn" data-noexport id="xrframe-time">time</dfn>, and either stores or is able to query concrete information about this state at the <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time①">time</a>.</p>
   <div class="algorithm" data-algorithm="get-viewer-pose">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRFrame" data-dfn-type="method" data-export id="dom-xrframe-getviewerpose"><code>getViewerPose(<var>referenceSpace</var>)</code></dfn> method provides the pose of the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑥">viewer</a> relative to <var>referenceSpace</var> as an <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose①">XRViewerPose</a></code>, at the <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑨">XRFrame</a></code>'s <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time②">time</a>.</p>
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be the target <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⓪">XRFrame</a></code></p>
     <li data-md>
      <p>Let <var>session</var> be <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session②">session</a></code> object.</p>
     <li data-md>
      <p>If <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-animationframe" id="ref-for-xrframe-animationframe①">animationFrame</a> boolean is <code>false</code>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑤">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>Let <var>pose</var> be a new <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose②">XRViewerPose</a></code> object.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#populate-the-pose" id="ref-for-populate-the-pose">Populate the pose</a> of <var>session</var>’s <a data-link-type="dfn" href="#xrsession-viewer-reference-space" id="ref-for-xrsession-viewer-reference-space①">viewer reference space</a> in <var>referenceSpace</var> at the time represented by <var>frame</var> into <var>pose</var>.</p>
     <li data-md>
      <p>If <var>pose</var> is <code>null</code> return <code>null</code>.</p>
     <li data-md>
      <p>Let <var>xrviews</var> be an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑤">list</a>.</p>
     <li data-md>
      <p>For each <a data-link-type="dfn" href="#view" id="ref-for-view④">view</a> <var>view</var> in the <a data-link-type="dfn" href="#xrsession-viewer-reference-space-list-of-views" id="ref-for-xrsession-viewer-reference-space-list-of-views①">list of views</a> on the<a data-link-type="dfn" href="#xrsession-viewer-reference-space" id="ref-for-xrsession-viewer-reference-space②">viewer reference space</a> of <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session③">session</a></code>, perform the following steps:</p>
      <ol>
       <li data-md>
        <p>Let <var>xrview</var> be a new <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①">XRView</a></code> object.</p>
       <li data-md>
        <p>Initialize <var>xrview</var>’s <a data-link-type="dfn" href="#xrview-underlying-view" id="ref-for-xrview-underlying-view">underlying view</a> to <var>view</var>.</p>
       <li data-md>
        <p>Initialize <var>xrview</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrview-eye" id="ref-for-dom-xrview-eye">eye</a></code> to <var>view</var>’s <a data-link-type="dfn" href="#view-eye" id="ref-for-view-eye">eye</a>.</p>
       <li data-md>
        <p>Initialize <var>xrview</var>’s <a data-link-type="dfn" href="#xrview-frame" id="ref-for-xrview-frame">frame</a> to <var>frame</var>.</p>
       <li data-md>
        <p>Let <var>offset</var> be an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform">XRRigidTransform</a></code> equal to the <a data-link-type="dfn" href="#view-offset" id="ref-for-view-offset">view offset</a> of <var>view</var></p>
       <li data-md>
        <p>Set <var>xrview</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrview-transform" id="ref-for-dom-xrview-transform">transform</a></code> property to the result of <a data-link-type="dfn" href="#multiply-transforms" id="ref-for-multiply-transforms">multiplying</a> the <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose③">XRViewerPose</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform">transform</a></code> by the <var>offset</var> transform</p>
       <li data-md>
        <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append">Append</a> <var>xrview</var> to <var>xrviews</var></p>
      </ol>
     <li data-md>
      <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views">views</a></code> to <var>xrviews</var></p>
     <li data-md>
      <p>Return <var>pose</var>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="get-pose">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRFrame" data-dfn-type="method" data-export id="dom-xrframe-getpose"><code>getPose(<var>space</var>, <var>baseSpace</var>)</code></dfn> method provides the pose of <var>space</var> relative to <var>baseSpace</var> as an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose①">XRPose</a></code>, at the time represented by the <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①①">XRFrame</a></code>.</p>
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be the target <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①②">XRFrame</a></code></p>
     <li data-md>
      <p>Let <var>pose</var> be a new <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose②">XRPose</a></code> object.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#populate-the-pose" id="ref-for-populate-the-pose①">Populate the pose</a> of <var>space</var> in <var>baseSpace</var> at the time represented by <var>frame</var> into <var>pose</var>.</p>
     <li data-md>
      <p>Return <var>pose</var>.</p>
    </ol>
   </div>
   <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="frame-update">frame update</dfn> is an algorithm that can be run given an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①③">XRFrame</a></code>, which is intended to be run each <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①④">XRFrame</a></code>.</p>
   <p>Every <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⓪">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-list-of-frame-updates">list of frame updates</dfn>, which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑥">list</a> of <a data-link-type="dfn" href="#frame-update" id="ref-for-frame-update">frame updates</a>, initially the empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑦">list</a>.</p>
   <div class="algorithm" data-algorithm="apply-frame-updates">
    <p>To <dfn class="dfn-paneled" data-dfn-for="XRFrame" data-dfn-type="dfn" data-noexport id="xrframe-apply-frame-updates">apply frame updates</dfn> for an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑤">XRFrame</a></code> <var>frame</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>For each <var>frame update</var> in <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session④">session</a></code>'s <a data-link-type="dfn" href="#xrsession-list-of-frame-updates" id="ref-for-xrsession-list-of-frame-updates">list of frame updates</a>, perform the following steps:</p>
      <ol>
       <li data-md>
        <p>Run <var>frame update</var> with <var>frame</var>.</p>
      </ol>
    </ol>
   </div>
   <p class="note" role="note"><span>NOTE:</span> This spec does not define any <a data-link-type="dfn" href="#frame-update" id="ref-for-frame-update①">frame updates</a>, but other specifications may add some.</p>
   <h2 class="heading settled" data-level="6" id="spaces"><span class="secno">6. </span><span class="content">Spaces</span><a class="self-link" href="#spaces"></a></h2>
   <p>A core feature of the WebXR Device API is the ability to provide spatial tracking. Spaces are the interface that enable applications to reason about how tracked entities are spatially related to the user’s physical environment and each other.</p>
   <h3 class="heading settled" data-level="6.1" id="xrspace-interface"><span class="secno">6.1. </span><span class="content">XRSpace</span><a class="self-link" href="#xrspace-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②">XRSpace</a></code> represents a virtual coordinate system with an origin that corresponds to a physical location. Spatial data that is requested from the API or given to the API is always expressed in relation to a specific <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace③">XRSpace</a></code> at the time of a specific <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑥">XRFrame</a></code>. Numeric values such as pose positions are coordinates in that space relative to its origin. The interface is intentionally opaque.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑤"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed④"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrspace"><code><c- g>XRSpace</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget②"><c- n>EventTarget</c-></a> {

};
</pre>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace④">XRSpace</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-session">session</dfn> which is set to the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦①">XRSession</a></code> that created the <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑤">XRSpace</a></code>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑥">XRSpace</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-native-origin">native origin</dfn> that is tracked by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑨">XR device</a>'s underlying tracking system, and an <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-effective-origin">effective origin</dfn>, which is the basis of the <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑦">XRSpace</a></code>'s <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-coordinate-system">coordinate system</dfn>. The transform from the effective space to the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin">native origin</a>'s space is defined by an <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-origin-offset">origin offset</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①">XRRigidTransform</a></code> initially set to an <a data-link-type="dfn" href="#identity-transform" id="ref-for-identity-transform①">identity transform</a>.</p>
   <p>The <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin">effective origin</a> of an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑧">XRSpace</a></code> can only be observed in the coordinate system of another <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑨">XRSpace</a></code> as an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose③">XRPose</a></code>, returned by an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑦">XRFrame</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-getpose" id="ref-for-dom-xrframe-getpose①">getPose()</a></code> method. The spatial relationship between <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⓪">XRSpace</a></code>s MAY change between <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑧">XRFrame</a></code>s.</p>
   <div class="algorithm" data-algorithm="populate-the-pose">
    <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="populate-the-pose">populate the pose</dfn> of an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①①">XRSpace</a></code> <var>space</var> in an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①②">XRSpace</a></code> <var>baseSpace</var> at the time represented by an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑨">XRFrame</a></code> <var>frame</var> into an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose④">XRPose</a></code> <var>pose</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>If <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active②">active</a> boolean is <code>false</code>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑥">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>Let <var>session</var> be <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑤">session</a></code> object.</p>
     <li data-md>
      <p>If <var>space</var>’s <a data-link-type="dfn" href="#xrspace-session" id="ref-for-xrspace-session">session</a> does not equal <var>session</var>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑦">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>If <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-session" id="ref-for-xrspace-session①">session</a> does not equal <var>session</var>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑧">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>Check if <a data-link-type="dfn" href="#poses-may-be-reported" id="ref-for-poses-may-be-reported">poses may be reported</a> and, if not, throw a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror" id="ref-for-securityerror③">SecurityError</a></code> and abort these steps.</p>
     <li data-md>
      <p>Let <var>limit</var> be the result of whether <a data-link-type="dfn" href="#poses-must-be-limited" id="ref-for-poses-must-be-limited">poses must be limited</a> between <var>space</var> and <var>baseSpace</var>.</p>
     <li data-md>
      <p>Let <var>transform</var> be <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform①">transform</a></code>.</p>
     <li data-md>
      <p>Query the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①⓪">XR device</a>'s tracking system for <var>space</var>’s pose relative to <var>baseSpace</var> at the <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time③">time</a>, then perform the following steps:</p>
      <dl class="switch">
       <dt> If <var>limit</var> is <code>false</code> and the tracking system provides a <a data-link-type="dfn" href="#6dof" id="ref-for-6dof②">6DoF</a> pose whose position is actively tracked or statically known for <var>space</var>’s pose relative to <var>baseSpace</var>: 
       <dd> Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation">orientation</a></code> to the orientation of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin①">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system">coordinate system</a>. 
       <dd> Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position">position</a></code> to the position of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin②">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system①">coordinate system</a>. 
       <dd> Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition">emulatedPosition</a></code> to <code>false</code>. 
       <dt> Else if <var>limit</var> is <code>false</code> and the tracking system provides a <a data-link-type="dfn" href="#3dof" id="ref-for-3dof②">3DoF</a> pose or a <a data-link-type="dfn" href="#6dof" id="ref-for-6dof③">6DoF</a> pose whose position is neither actively tracked nor statically known for <var>space</var>’s pose relative to <var>baseSpace</var>: 
       <dd> Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①">orientation</a></code> to the orientation of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin③">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system②">coordinate system</a>. 
       <dd> Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①">position</a></code> to the tracking system’s best estimate of the position of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin④">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system③">coordinate system</a>. This MAY include a computed offset such as a neck or arm model. If a position estimate is not available, the last known position MUST be used. 
       <dd> Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition①">emulatedPosition</a></code> to <code>true</code>. 
       <dt> Else if <var>space</var>’s pose relative to <var>baseSpace</var> has been determined in the past: 
       <dd> Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position②">position</a></code> to the last known position of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑤">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system④">coordinate system</a>. 
       <dd> Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation②">orientation</a></code> to the last known orientation of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑥">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system⑤">coordinate system</a>. 
       <dd> Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition②">emulatedPosition</a></code> boolean to <code>true</code>. 
       <dt> Else if <var>space</var>’s pose relative to <var>baseSpace</var> has never been determined: 
       <dd> Set <var>pose</var> to <code>null</code>. 
      </dl>
    </ol>
    <p class="note" role="note"><span>Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑤">XRPose</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition③">emulatedPosition</a></code> boolean does not indicate whether <var>baseSpace</var>’s position is emulated or not, only whether evaluating <var>space</var>’s position relative to <var>baseSpace</var> relies on emulation. For example, a controller with <a data-link-type="dfn" href="#3dof" id="ref-for-3dof③">3DoF</a> tracking would report poses with an <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition④">emulatedPosition</a></code> of <code>true</code> when its <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetrayspace" id="ref-for-dom-xrinputsource-targetrayspace">targetRaySpace</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace①">gripSpace</a></code> are queried against an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace⑤">XRReferenceSpace</a></code>, but would report an <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑤">emulatedPosition</a></code> of <code>false</code> if the pose of the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetrayspace" id="ref-for-dom-xrinputsource-targetrayspace①">targetRaySpace</a></code> was queried in <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace②">gripSpace</a></code>, because the relationship between those two spaces should be known exactly.</p>
   </div>
   <h3 class="heading settled" data-level="6.2" id="xrreferencespace-interface"><span class="secno">6.2. </span><span class="content">XRReferenceSpace</span><a class="self-link" href="#xrreferencespace-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace⑥">XRReferenceSpace</a></code> is one of several common <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①③">XRSpace</a></code>s that applications can use to establish a spatial relationship with the user’s physical environment.</p>
   <p><code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace⑦">XRReferenceSpace</a></code>s are generally expected to remain static for the duration of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦②">XRSession</a></code>, with the most common exception being mid-session reconfiguration by the user. The <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①">native origin</a> for every <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace⑧">XRReferenceSpace</a></code> describes a coordinate system where <code>+X</code> is considered "Right", <code>+Y</code> is considered "Up", and <code>-Z</code> is considered "Forward".</p>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrreferencespacetype"><code><c- g>XRReferenceSpaceType</c-></code></dfn> {
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer②"><c- s>"viewer"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local③"><c- s>"local"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor①"><c- s>"local-floor"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor③"><c- s>"bounded-floor"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded①"><c- s>"unbounded"</c-></a>
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑥"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑤"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrreferencespace"><code><c- g>XRReferenceSpace</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①④"><c- n>XRSpace</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#NewObject" id="ref-for-NewObject②"><c- g>NewObject</c-></a>] <a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace⑨"><c- n>XRReferenceSpace</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace"><c- g>getOffsetReferenceSpace</c-></a>(<a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②"><c- n>XRRigidTransform</c-></a> <dfn class="idl-code" data-dfn-for="XRReferenceSpace/getOffsetReferenceSpace(originOffset)" data-dfn-type="argument" data-export id="dom-xrreferencespace-getoffsetreferencespace-originoffset-originoffset"><code><c- g>originOffset</c-></code><a class="self-link" href="#dom-xrreferencespace-getoffsetreferencespace-originoffset-originoffset"></a></dfn>);

  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①⓪"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrreferencespace-onreset" id="ref-for-dom-xrreferencespace-onreset"><c- g>onreset</c-></a>;
};
</pre>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⓪">XRReferenceSpace</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRReferenceSpace" data-dfn-type="dfn" data-noexport id="xrreferencespace-type">type</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype③">XRReferenceSpaceType</a></code>.</p>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①①">XRReferenceSpace</a></code> is most frequently obtained by calling <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestreferencespace" id="ref-for-dom-xrsession-requestreferencespace①">requestReferenceSpace()</a></code>, which creates an instance of an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①②">XRReferenceSpace</a></code> (or an interface extending it) if the <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype④">XRReferenceSpaceType</a></code> enum value passed into the call <a data-link-type="dfn" href="#reference-space-is-supported" id="ref-for-reference-space-is-supported">is supported</a>. The type indicates the tracking behavior that the reference space will exhibit:</p>
   <ul>
    <li data-md>
     <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt="&quot;viewer&quot;|viewer" id="dom-xrreferencespacetype-viewer"><code>viewer</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①③">XRReferenceSpace</a></code> instance. It represents a tracking space with a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②">native origin</a> which tracks the position and orientation of the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑦">viewer</a>. Every <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦③">XRSession</a></code> MUST support <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer③">"viewer"</a></code> <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①④">XRReferenceSpace</a></code>s.</p>
    <li data-md>
     <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt="&quot;local&quot;|local" id="dom-xrreferencespacetype-local"><code>local</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑤">XRReferenceSpace</a></code> instance. It represents a tracking space with a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin③">native origin</a> near the viewer at the time of creation. The exact position and orientation will be initialized based on the conventions of the underlying platform. When using this reference space the user is not expected to move beyond their initial position much, if at all, and tracking is optimized for that purpose. For devices with <a data-link-type="dfn" href="#6dof" id="ref-for-6dof④">6DoF</a> tracking, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local④">local</a></code> reference spaces should emphasize keeping the origin stable relative to the user’s environment.</p>
    <li data-md>
     <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt="&quot;local-floor&quot;|local-floor" id="dom-xrreferencespacetype-local-floor"><code>local-floor</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑥">XRReferenceSpace</a></code> instance. It represents a tracking space with a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin④">native origin</a> at the floor in a safe position for the user to stand. The <code>y</code> axis equals <code>0</code> at floor level, with the <code>x</code> and <code>z</code> position and orientation initialized based on the conventions of the underlying platform. If the floor level isn’t known it MUST be estimated, with some <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="estimated-floor-level">estimated floor level</dfn>. If the <a data-link-type="dfn" href="#estimated-floor-level" id="ref-for-estimated-floor-level">estimated floor level</a> is determined with a non-default value, it MUST be <a data-link-type="dfn" href="#rounding" id="ref-for-rounding">rounded</a> sufficiently to prevent fingerprinting. When using this reference space the user is not expected to move beyond their initial position much, if at all, and tracking is optimized for that purpose. For devices with <a data-link-type="dfn" href="#6dof" id="ref-for-6dof⑤">6DoF</a> tracking, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor②">local-floor</a></code> reference spaces should emphasize keeping the origin stable relative to the user’s environment.</p>
     <p class="note" role="note"><span>Note:</span> If the floor level of a <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor③">"local-floor"</a></code> reference space is adjusted to prevent fingerprinting, <a data-link-type="dfn" href="#rounding" id="ref-for-rounding①">rounded</a> to the nearest 1cm is suggested.</p>
    <li data-md>
     <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt="&quot;bounded-floor&quot;|bounded-floor" id="dom-xrreferencespacetype-bounded-floor"><code>bounded-floor</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace">XRBoundedReferenceSpace</a></code> instance. It represents a tracking space with its <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑤">native origin</a> at the floor, where the user is expected to move within a pre-established boundary, given as the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry">boundsGeometry</a></code>. Tracking in a <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor④">bounded-floor</a></code> reference space is optimized for keeping the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑥">native origin</a> and <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry①">boundsGeometry</a></code> stable relative to the user’s environment.</p>
    <li data-md>
     <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt="&quot;unbounded&quot;|unbounded" id="dom-xrreferencespacetype-unbounded"><code>unbounded</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑦">XRReferenceSpace</a></code> instance. It represents a tracking space where the user is expected to move freely around their environment, potentially even long distances from their starting point. Tracking in an <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded②">unbounded</a></code> reference space is optimized for stability around the user’s current position, and as such the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑦">native origin</a> may drift over time.</p>
   </ul>
   <p>Devices that support <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑤">"local"</a></code> reference spaces MUST support <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor④">"local-floor"</a></code> reference spaces, through emulation if necessary, and vice versa.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpace" data-dfn-type="attribute" data-export id="dom-xrreferencespace-onreset"><code>onreset</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes①⓪">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset">reset</a></code> event type.</p>
   <div class="algorithm" data-algorithm="create-reference-space">
    <p>When an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑧">XRReferenceSpace</a></code> is requested, the user agent MUST <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-reference-space">create a reference space</dfn> by running the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>session</var> be the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦④">XRSession</a></code> object that requested creation of a reference space.</p>
     <li data-md>
      <p>Let <var>type</var> be set to the <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype⑤">XRReferenceSpaceType</a></code> passed to <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestreferencespace" id="ref-for-dom-xrsession-requestreferencespace②">requestReferenceSpace()</a></code>.</p>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="#reference-space-is-supported" id="ref-for-reference-space-is-supported①">reference space is supported</a> for <var>type</var> and <var>session</var>, run the following steps:</p>
      <ol>
       <li data-md>
        <p>Initialize <var>referenceSpace</var> as follows:</p>
        <dl class="switch">
         <dt> If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑤">bounded-floor</a></code> 
         <dd> Let <var>referenceSpace</var> be a new <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①">XRBoundedReferenceSpace</a></code>. 
         <dt> Otherwise 
         <dd> Let <var>referenceSpace</var> be a new <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑨">XRReferenceSpace</a></code>. 
        </dl>
       <li data-md>
        <p>Initialize <var>referenceSpace</var>’s <a data-link-type="dfn" href="#xrreferencespace-type" id="ref-for-xrreferencespace-type">type</a> to <var>type</var>.</p>
       <li data-md>
        <p>Initialize <var>referenceSpace</var>’s <a data-link-type="dfn" href="#xrspace-session" id="ref-for-xrspace-session②">session</a> to <var>session</var>.</p>
       <li data-md>
        <p>Return <var>referenceSpace</var></p>
      </ol>
     <li data-md>
      <p>Return <code>null</code>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="reference-space-supported">
     To check if a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="reference-space-is-supported">reference space is supported</dfn> for a given reference space type <var>type</var> and <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑤">XRSession</a></code> <var>session</var>, run the following steps: 
    <ol>
     <li data-md>
      <p>If <var>type</var> is not <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain⑤">contained</a> in <var>session</var>’s <a data-link-type="dfn" href="#xrsession-list-of-enabled-features" id="ref-for-xrsession-list-of-enabled-features④">list of enabled features</a> return <code>false</code>.</p>
     <li data-md>
      <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer④">viewer</a></code>, return <code>true</code>.</p>
     <li data-md>
      <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑥">local</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑤">local-floor</a></code>, and <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑧">immersive session</a>, return <code>true</code>.</p>
     <li data-md>
      <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑦">local</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑥">local-floor</a></code>, and the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⓪">XR device</a> supports reporting orientation data, return <code>true</code>.</p>
     <li data-md>
      <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑥">bounded-floor</a></code> and <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑨">immersive session</a>, return the result of whether <a data-link-type="dfn" href="#bounded-reference-spaces-are-supported" id="ref-for-bounded-reference-spaces-are-supported">bounded reference spaces are supported</a> by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②①">XR device</a>.</p>
     <li data-md>
      <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded③">unbounded</a></code>, <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⓪">immersive session</a>, and the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②②">XR device</a> supports stable tracking near the user over an unlimited distance, return <code>true</code>.</p>
     <li data-md>
      <p>Return <code>false</code>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="get-offset-space">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpace" data-dfn-type="method" data-export id="dom-xrreferencespace-getoffsetreferencespace"><code>getOffsetReferenceSpace(<var>originOffset</var>)</code></dfn> method MUST perform the following steps when invoked: 
    <ol>
     <li data-md>
      <p>Let <var>base</var> be the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⓪">XRReferenceSpace</a></code> the method was called on.</p>
     <li data-md>
      <p>Initialize <var>offsetSpace</var> as follows:</p>
      <dl class="switch">
       <dt> If <var>base</var> is an instance of <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace②">XRBoundedReferenceSpace</a></code> 
       <dd> Let <var>offsetSpace</var> be a new <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace③">XRBoundedReferenceSpace</a></code> and set <var>offsetSpace</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry②">boundsGeometry</a></code> to <var>base</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry③">boundsGeometry</a></code>, with each point multiplied by the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse">inverse</a></code> of <var>originOffset</var>. 
       <dt> Else 
       <dd> Let <var>offsetSpace</var> be a new <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②①">XRReferenceSpace</a></code>. 
      </dl>
     <li data-md>
      <p>Set <var>offsetSpace</var>’s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑧">native origin</a> to <var>base</var>’s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑨">native origin</a>.</p>
     <li data-md>
      <p>Set <var>offsetSpace</var>’s <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset①">origin offset</a> to the result of <a data-link-type="dfn" href="#multiply-transforms" id="ref-for-multiply-transforms①">multiplying</a> <var>base</var>’s <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset②">origin offset</a> by <var>originOffset</var>.</p>
     <li data-md>
      <p>Return <var>offsetSpace</var>.</p>
    </ol>
   </div>
   <p class="note" role="note"><span>Note:</span> It’s expected that some applications will use <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace①">getOffsetReferenceSpace()</a></code> to implement scene navigation controls based on mouse, keyboard, touch, or gamepad input. This will result in <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace②">getOffsetReferenceSpace()</a></code> being called frequently, at least once per-frame during periods of active input. As a result UAs are strongly encouraged to make the creation of new <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②②">XRReferenceSpace</a></code>s with <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace③">getOffsetReferenceSpace()</a></code> a lightweight operation.</p>
   <h3 class="heading settled" data-level="6.3" id="xrboundedreferencespace-interface"><span class="secno">6.3. </span><span class="content">XRBoundedReferenceSpace</span><a class="self-link" href="#xrboundedreferencespace-interface"></a></h3>
   <p><code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace④">XRBoundedReferenceSpace</a></code> extends <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②③">XRReferenceSpace</a></code> to include <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry④">boundsGeometry</a></code>, indicating the pre-configured boundaries of the users space.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑦"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑥"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrboundedreferencespace"><code><c- g>XRBoundedReferenceSpace</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace②④"><c- n>XRReferenceSpace</c-></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly"><c- n>DOMPointReadOnly</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMPointReadOnly>" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑤"><c- g>boundsGeometry</c-></a>;
};
</pre>
   <p>The origin of an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑤">XRBoundedReferenceSpace</a></code> MUST be positioned at the floor, such that the <code>y</code> axis equals <code>0</code> at floor level. The <code>x</code> and <code>z</code> position and orientation are initialized based on the conventions of the underlying platform, typically expected to be near the center of the room facing in a logical forward direction.</p>
   <p class="note" role="note"><span>Note:</span> Other XR platforms sometimes refer to the type of tracking offered by a <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑦">bounded-floor</a></code> reference space as "room scale" tracking. An <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑥">XRBoundedReferenceSpace</a></code> is not intended to describe multi-room spaces, areas with uneven floor levels, or very large open areas. Content that needs to handle those scenarios should use an <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded④">unbounded</a></code> reference space.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑦">XRBoundedReferenceSpace</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRBoundedReferenceSpace" data-dfn-type="dfn" data-noexport id="xrboundedreferencespace-native-bounds-geometry">native bounds geometry</dfn> describing the border around the <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑧">XRBoundedReferenceSpace</a></code>, which the user can expect to safely move within. The polygonal boundary is given as an array of <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly①">DOMPointReadOnly</a></code>s, which represents a loop of points at the edges of the safe space. The points describe offsets from the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⓪">native origin</a> in meters. Points MUST be given in a clockwise order as viewed from above, looking towards the negative end of the Y axis. The <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-y" id="ref-for-dom-dompointreadonly-y">y</a></code> value of each point MUST be <code>0</code> and the <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w">w</a></code> value of each point MUST be <code>1</code>. The bounds can be considered to originate at the floor and extend infinitely high. The shape it describes MAY be convex or concave.</p>
   <p>Each point in the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry">native bounds geometry</a> MUST be <a data-link-type="dfn" href="#limiting" id="ref-for-limiting">limited</a> to a reasonable distance from the reference space’s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①①">native origin</a>.</p>
   <p class="note" role="note"><span>Note:</span> It is suggested that points of the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry①">native bounds geometry</a> be <a data-link-type="dfn" href="#limiting" id="ref-for-limiting①">limited</a> to 15 meters from the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①②">native origin</a> in all directions.</p>
   <p>Each point in the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry②">native bounds geometry</a> MUST also be <a data-link-type="dfn" href="#quantization" id="ref-for-quantization">quantized</a> sufficiently to prevent fingerprinting.  For user’s safety, quantized points values MUST NOT fall outside the bounds reported by the platform.</p>
   <p class="note" role="note"><span>Note:</span> It is suggested that points of the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry③">native bounds geometry</a> be <a data-link-type="dfn" href="#quantization" id="ref-for-quantization①">quantized</a> to the nearest 5cm.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRBoundedReferenceSpace" data-dfn-type="attribute" data-export id="dom-xrboundedreferencespace-boundsgeometry"><code>boundsGeometry</code></dfn> attribute is an array of <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly②">DOMPointReadOnly</a></code>s such that each entry is equal to the entry in the <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑨">XRBoundedReferenceSpace</a></code>'s <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry④">native bounds geometry</a> premultiplied by the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse①">inverse</a></code> of the <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset③">origin offset</a>. In other words, it provides the same border in <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①⓪">XRBoundedReferenceSpace</a></code> coordinates relative to the <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑦">effective origin</a>.</p>
   <div class="algorithm" data-algorithm="bounded-space-supported">
     To check if <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="bounded-reference-spaces-are-supported">bounded reference spaces are supported</dfn> run the following steps: 
    <ol>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②③">XR device</a> cannot report boundaries, return false.</p>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②④">XR device</a> cannot identify the height of the user’s physical floor, return false.</p>
     <li data-md>
      <p>Return true.</p>
    </ol>
   </div>
   <p class="note" role="note"><span>Note:</span> Content should not require the user to move beyond the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑥">boundsGeometry</a></code>. It is possible for the user to move beyond the bounds if their physical surroundings allow for it, resulting in position values outside of the polygon they describe. This is not an error condition and should be handled gracefully by page content.</p>
   <p class="note" role="note"><span>Note:</span> Content generally should not provide a visualization of the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑦">boundsGeometry</a></code>, as it’s the user agent’s responsibility to ensure that safety critical information is provided to the user.</p>
   <h2 class="heading settled" data-level="7" id="views"><span class="secno">7. </span><span class="content">Views</span><a class="self-link" href="#views"></a></h2>
   <h3 class="heading settled" data-level="7.1" id="xrview-interface"><span class="secno">7.1. </span><span class="content">XRView</span><a class="self-link" href="#xrview-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②">XRView</a></code> describes a single <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="view">view</dfn> into an XR scene for a given frame.</p>
   <p>Each <a data-link-type="dfn" href="#view" id="ref-for-view⑤">view</a> corresponds to a display or portion of a display used by an XR device to present imagery to the user. They are used to retrieve all the information necessary to render content that is well aligned to the <a data-link-type="dfn" href="#view" id="ref-for-view⑥">view</a>'s physical output properties, including the field of view, eye offset, and other optical properties. <a data-link-type="dfn" href="#view" id="ref-for-view⑦">Views</a> may cover overlapping regions of the user’s vision. No guarantee is made about the number of <a data-link-type="dfn" href="#view" id="ref-for-view⑧">views</a> any XR device uses or their order, nor is the number of <a data-link-type="dfn" href="#view" id="ref-for-view⑨">views</a> required to be constant for the duration of an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑥">XRSession</a></code>.</p>
   <p>A <a data-link-type="dfn" href="#view" id="ref-for-view①⓪">view</a> has an associated internal <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="view-offset">view offset</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform③">XRRigidTransform</a></code> describing the position and orientation of the <a data-link-type="dfn" href="#view" id="ref-for-view①①">view</a> in the <a data-link-type="dfn" href="#xrsession-viewer-reference-space" id="ref-for-xrsession-viewer-reference-space③">viewer reference space</a>'s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system⑥">coordinate system</a>.</p>
   <p>A <a data-link-type="dfn" href="#view" id="ref-for-view①②">view</a> has an associated <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-projection-matrix">projection matrix</dfn> which is a <a data-link-type="dfn" href="#matrix" id="ref-for-matrix">matrix</a> describing the projection to be used when rendering the <a data-link-type="dfn" href="#view" id="ref-for-view①③">view</a>, provided by the underlying XR device. The <a data-link-type="dfn" href="#view-projection-matrix" id="ref-for-view-projection-matrix">projection matrix</a> MAY include transformations such as shearing that prevent the projection from being accurately described by a simple frustum.</p>
   <p>A <a data-link-type="dfn" href="#view" id="ref-for-view①④">view</a> has an associated <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-eye">eye</dfn> which is an <code class="idl"><a data-link-type="idl" href="#enumdef-xreye" id="ref-for-enumdef-xreye">XREye</a></code> describing which eye this view is expected to be shown to. If the view does not have an intrinsically associated eye (the display is monoscopic, for example) this value MUST be set to <code class="idl"><a data-link-type="idl" href="#dom-xreye-none" id="ref-for-dom-xreye-none">"none"</a></code>.</p>
   <p class="note" role="note"><span>Note:</span> Many HMDs will request that content render two <a data-link-type="dfn" href="#view" id="ref-for-view①⑤">views</a>, one for the left eye and one for the right, while most magic window devices will only request one <a data-link-type="dfn" href="#view" id="ref-for-view①⑥">view</a>, but applications should never assume a specific view configuration. For example: A magic window device may request two views if it is capable of stereo output, but may revert to requesting a single view for performance reasons if the stereo output mode is turned off. Similarly, HMDs may request more than two views to facilitate a wide field of view or displays of different pixel density.</p>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xreye"><code><c- g>XREye</c-></code></dfn> {
  <dfn class="dfn-paneled idl-code" data-dfn-for="XREye" data-dfn-type="enum-value" data-export id="dom-xreye-none"><code><c- s>"none"</c-></code></dfn>,
  <dfn class="idl-code" data-dfn-for="XREye" data-dfn-type="enum-value" data-export id="dom-xreye-left"><code><c- s>"left"</c-></code><a class="self-link" href="#dom-xreye-left"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="XREye" data-dfn-type="enum-value" data-export id="dom-xreye-right"><code><c- s>"right"</c-></code><a class="self-link" href="#dom-xreye-right"></a></dfn>
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑧"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑦"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrview"><code><c- g>XRView</c-></code></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-xreye" id="ref-for-enumdef-xreye①"><c- n>XREye</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XREye" href="#dom-xrview-eye" id="ref-for-dom-xrview-eye①"><c- g>eye</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-Float32Array" id="ref-for-idl-Float32Array"><c- b>Float32Array</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array" href="#dom-xrview-projectionmatrix" id="ref-for-dom-xrview-projectionmatrix②"><c- g>projectionMatrix</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject④"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform④"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrview-transform" id="ref-for-dom-xrview-transform①"><c- g>transform</c-></a>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRView" data-dfn-type="attribute" data-export id="dom-xrview-eye"><code>eye</code></dfn> attribute describes is the <a data-link-type="dfn" href="#view-eye" id="ref-for-view-eye①">eye</a> of the underlying <a data-link-type="dfn" href="#view" id="ref-for-view①⑦">view</a>. This attribute’s primary purpose is to ensure that pre-rendered stereo content can present the correct portion of the content to the correct eye.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRView" data-dfn-type="attribute" data-export id="dom-xrview-projectionmatrix"><code>projectionMatrix</code></dfn> attribute is the <a data-link-type="dfn" href="#view-projection-matrix" id="ref-for-view-projection-matrix①">projection matrix</a> of the underlying <a data-link-type="dfn" href="#view" id="ref-for-view①⑧">view</a>. It is <b>strongly recommended</b> that applications use this matrix without modification or decomposition. Failure to use the provided projection matrices when rendering may cause the presented frame to be distorted or badly aligned, resulting in varying degrees of user discomfort. This attribute MUST be computed by <a data-link-type="dfn" href="#xrview-obtain-the-projection-matrix" id="ref-for-xrview-obtain-the-projection-matrix">obtaining the projection matrix</a> for the <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview③">XRView</a></code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRView" data-dfn-type="attribute" data-export id="dom-xrview-transform"><code>transform</code></dfn> attribute is the <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑤">XRRigidTransform</a></code> of the viewpoint. It represents the position and orientation of the viewpoint in the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⑤">XRReferenceSpace</a></code> provided in <code class="idl"><a data-link-type="idl" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose②">getViewerPose()</a></code>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview④">XRView</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-frame">frame</dfn> which is the <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⓪">XRFrame</a></code> that produced it.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑤">XRView</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-underlying-view">underlying view</dfn> which is the underlying <a data-link-type="dfn" href="#view" id="ref-for-view①⑨">view</a> that it represents.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑥">XRView</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-internal-projection-matrix">internal projection matrix</dfn> which stores the <a data-link-type="dfn" href="#view-projection-matrix" id="ref-for-view-projection-matrix②">projection matrix</a> of its <a data-link-type="dfn" href="#xrview-underlying-view" id="ref-for-xrview-underlying-view①">underlying view</a>. It is initially <code>null</code>.</p>
   <p class="note" role="note"><span>Note:</span> The <code class="idl"><a data-link-type="idl" href="#dom-xrview-transform" id="ref-for-dom-xrview-transform②">transform</a></code> can be used to position camera objects in many rendering libraries. If a more traditional view matrix is needed by the application one can be retrieved by calling <code>view.transform.inverse.matrix</code>.</p>
   <div class="algorithm" data-algorithm="obtain-xrview-projection">
    <p>To <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-obtain-the-projection-matrix">obtain the projection matrix</dfn> for a given <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑦">XRView</a></code> <var>view</var></p>
    <ol>
     <li data-md>
      <p>If <var>view</var>’s <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix">internal projection matrix</a> is not <code>null</code>, perform the following steps:</p>
      <ol>
       <li data-md>
        <p>If the operation <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-isdetachedbuffer" id="ref-for-sec-isdetachedbuffer">IsDetachedBuffer</a></code> on <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix①">internal projection matrix</a> is <code>false</code>, return <var>view</var>’s <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix②">internal projection matrix</a>.</p>
      </ol>
     <li data-md>
      <p>Set <var>view</var>’s <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix③">internal projection matrix</a> to a new <a data-link-type="dfn" href="#matrix" id="ref-for-matrix①">matrix</a> which is equal to <var>view</var>’s <a data-link-type="dfn" href="#xrview-underlying-view" id="ref-for-xrview-underlying-view②">underlying view</a>'s <a data-link-type="dfn" href="#view-projection-matrix" id="ref-for-view-projection-matrix③">projection matrix</a>.</p>
     <li data-md>
      <p>Return <var>view</var>’s <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix④">internal projection matrix</a>.</p>
    </ol>
   </div>
   <h3 class="heading settled" data-level="7.2" id="xrviewport-interface"><span class="secno">7.2. </span><span class="content">XRViewport</span><a class="self-link" href="#xrviewport-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport">XRViewport</a></code> object describes a viewport, or rectangular region, of a graphics surface.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑨"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑧"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrviewport"><code><c- g>XRViewport</c-></code></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long②"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x"><c- g>x</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long③"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y"><c- g>y</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long④"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-width" id="ref-for-dom-xrviewport-width"><c- g>width</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long⑤"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-height" id="ref-for-dom-xrviewport-height"><c- g>height</c-></a>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewport" data-dfn-type="attribute" data-export id="dom-xrviewport-x"><code>x</code></dfn> and <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewport" data-dfn-type="attribute" data-export id="dom-xrviewport-y"><code>y</code></dfn> attributes define an offset from the surface origin and the <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewport" data-dfn-type="attribute" data-export id="dom-xrviewport-width"><code>width</code></dfn> and <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewport" data-dfn-type="attribute" data-export id="dom-xrviewport-height"><code>height</code></dfn> attributes define the rectangular dimensions of the viewport.</p>
   <p>The exact interpretation of the viewport values depends on the conventions of the graphics API the viewport is associated with:</p>
   <ul>
    <li data-md>
     <p>When used with an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑤">XRWebGLLayer</a></code> the <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x①">x</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y①">y</a></code> attributes specify the lower left corner of the viewport rectangle, in pixels, with the viewport rectangle extending <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-width" id="ref-for-dom-xrviewport-width①">width</a></code> pixels to the right of <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x②">x</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-height" id="ref-for-dom-xrviewport-height①">height</a></code> pixels above <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y②">y</a></code>. The values can be passed to the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4">WebGL viewport</a> function directly.</p>
   </ul>
   <div class="example" id="example-36db3bb0">
    <a class="self-link" href="#example-36db3bb0"></a> The following code loops through all of the <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑧">XRView</a></code>s of an <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose④">XRViewerPose</a></code>, queries an <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport①">XRViewport</a></code> from an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑥">XRWebGLLayer</a></code> for each, and uses them to set the appropriate <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4①">WebGL viewport</a>s for rendering. 
<pre class="highlight">xrSession<c- p>.</c->requestAnimationFrame<c- p>((</c->time<c- p>,</c-> xrFrame<c- p>)</c-> <c- p>=></c-> <c- p>{</c->
  <c- a>let</c-> viewer <c- o>=</c-> xrFrame<c- p>.</c->getViewerPose<c- p>(</c->xrReferenceSpace<c- p>);</c->

  gl<c- p>.</c->bindFramebuffer<c- p>(</c->xrWebGLLayer<c- p>.</c->framebuffer<c- p>);</c->
  <c- k>for</c-> <c- p>(</c->xrView <c- k>of</c-> viewer<c- p>.</c->views<c- p>)</c-> <c- p>{</c->
    <c- a>let</c-> xrViewport <c- o>=</c-> xrWebGLLayer<c- p>.</c->getViewport<c- p>(</c->xrView<c- p>);</c->
    gl<c- p>.</c->viewport<c- p>(</c->xrViewport<c- p>.</c->x<c- p>,</c-> xrViewport<c- p>.</c->y<c- p>,</c-> xrViewport<c- p>.</c->width<c- p>,</c-> xrViewport<c- p>.</c->height<c- p>);</c->

    <c- c1>// WebGL draw calls will now be rendered into the appropriate viewport.</c->
  <c- p>}</c->
<c- p>});</c->
</pre>
   </div>
   <h2 class="heading settled" data-level="8" id="geometricprimitives"><span class="secno">8. </span><span class="content">Geometric Primitives</span><a class="self-link" href="#geometricprimitives"></a></h2>
   <h3 class="heading settled" data-level="8.1" id="matrices"><span class="secno">8.1. </span><span class="content">Matrices</span><a class="self-link" href="#matrices"></a></h3>
   <p>WebXR provides various transforms in the form of <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="matrix" data-noexport id="matrix">matrices</dfn>. WebXR uses the WebGL conventions when communicating matrices, in which 4x4 matrices are given as 16 element <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-Float32Array" id="ref-for-idl-Float32Array①">Float32Array</a></code>s with column major storage, and are applied to column vectors by premultiplying the matrix from the left. They may be passed directly to WebGL’s <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10" id="ref-for-5.14.10">uniformMatrix4fv</a></code> function, used to create an equivalent <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dommatrix" id="ref-for-dommatrix">DOMMatrix</a></code>, or used with a variety of third party math libraries.</p>
   <div class="example" id="example-2a96dddb">
    <a class="self-link" href="#example-2a96dddb"></a> Matrices returned from the WebXR Device API will be a 16 element <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-Float32Array" id="ref-for-idl-Float32Array②">Float32Array</a></code> laid out like so: 
<pre>[a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15]
</pre>
    <p>Applying this matrix as a transform to a column vector specified as a <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly③">DOMPointReadOnly</a></code> like so:</p>
<pre>{x:X, y:Y, z:Z, w:1}</pre>
    <p>Produces the following result:</p>
<pre>a0 a4 a8  a12  *  X  =  a0 * X + a4 * Y +  a8 * Z + a12
a1 a5 a9  a13     Y     a1 * X + a5 * Y +  a9 * Z + a13
a2 a6 a10 a14     Z     a2 * X + a6 * Y + a10 * Z + a14
a3 a7 a11 a15     1     a3 * X + a7 * Y + a11 * Z + a15
</pre>
   </div>
   <h3 class="heading settled" data-level="8.2" id="normalization"><span class="secno">8.2. </span><span class="content">Normalization</span><a class="self-link" href="#normalization"></a></h3>
   <p>There are several algorithms which call for a vector or quaternion to be normalized, which means to scale the components to have a collective magnitude of <code>1.0</code>.</p>
   <div class="algorithm" data-algorithm="normalize">
    <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="normalize">normalize</dfn> a list of components the UA MUST perform the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>length</var> be the square root of the sum of the squares of each component.</p>
     <li data-md>
      <p>If <var>length</var> is <code>0</code>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑨">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>Divide each component by <var>length</var> and set the component.</p>
    </ol>
   </div>
   <h3 class="heading settled" data-level="8.3" id="xrrigidtransform-interface"><span class="secno">8.3. </span><span class="content">XRRigidTransform</span><a class="self-link" href="#xrrigidtransform-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑥">XRRigidTransform</a></code> is a transform described by a <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position③">position</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation③">orientation</a></code>. When interpreting an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑦">XRRigidTransform</a></code> the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation④">orientation</a></code> is always applied prior to the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position④">position</a></code>.</p>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑧">XRRigidTransform</a></code> contains an <dfn class="dfn-paneled" data-dfn-for="XRRigidTransform" data-dfn-type="dfn" data-noexport id="xrrigidtransform-internal-matrix">internal matrix</dfn> which is a <a data-link-type="dfn" href="#matrix" id="ref-for-matrix②">matrix</a>.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⓪"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑨"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrrigidtransform"><code><c- g>XRRigidTransform</c-></code></dfn> {
  <a class="idl-code" data-link-type="constructor" href="#dom-xrrigidtransform-xrrigidtransform" id="ref-for-dom-xrrigidtransform-xrrigidtransform"><c- g>constructor</c-></a>(<c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit"><c- n>DOMPointInit</c-></a> <dfn class="idl-code" data-dfn-for="XRRigidTransform/XRRigidTransform(position, orientation), XRRigidTransform/constructor(position, orientation), XRRigidTransform/XRRigidTransform(position), XRRigidTransform/constructor(position), XRRigidTransform/XRRigidTransform(), XRRigidTransform/constructor()" data-dfn-type="argument" data-export id="dom-xrrigidtransform-xrrigidtransform-position-orientation-position"><code><c- g>position</c-></code><a class="self-link" href="#dom-xrrigidtransform-xrrigidtransform-position-orientation-position"></a></dfn> = {}, <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit①"><c- n>DOMPointInit</c-></a> <dfn class="idl-code" data-dfn-for="XRRigidTransform/XRRigidTransform(position, orientation), XRRigidTransform/constructor(position, orientation), XRRigidTransform/XRRigidTransform(position), XRRigidTransform/constructor(position), XRRigidTransform/XRRigidTransform(), XRRigidTransform/constructor()" data-dfn-type="argument" data-export id="dom-xrrigidtransform-xrrigidtransform-position-orientation-orientation"><code><c- g>orientation</c-></code><a class="self-link" href="#dom-xrrigidtransform-xrrigidtransform-position-orientation-orientation"></a></dfn> = {});
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑤"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly④"><c- n>DOMPointReadOnly</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑤"><c- g>position</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑥"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly⑤"><c- n>DOMPointReadOnly</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑤"><c- g>orientation</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-Float32Array" id="ref-for-idl-Float32Array③"><c- b>Float32Array</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix"><c- g>matrix</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑦"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑨"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse②"><c- g>inverse</c-></a>;
};
</pre>
   <div class="algorithm" data-algorithm="construct-rigid-transform">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="constructor" data-export data-lt="XRRigidTransform(position, orientation)|constructor(position, orientation)|XRRigidTransform(position)|constructor(position)|XRRigidTransform()|constructor()" id="dom-xrrigidtransform-xrrigidtransform"><code>XRRigidTransform(<var>position</var>, <var>orientation</var>)</code></dfn> constructor MUST perform the following steps when invoked:</p>
    <ol>
     <li data-md>
      <p>Let <var>transform</var> be a new <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⓪">XRRigidTransform</a></code>.</p>
     <li data-md>
      <p>If <var>position</var> is not a <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit②">DOMPointInit</a></code> initialize <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑥">position</a></code> to <code>{ x: 0.0, y: 0.0, z: 0.0, w: 1.0 }</code>.</p>
     <li data-md>
      <p>If <var>position</var>’s <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w①">w</a></code> value is not 1.0, throw a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror">TypeError</a></code>.</p>
     <li data-md>
      <p>Initialize <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑦">position</a></code>’s <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-x" id="ref-for-dom-dompointreadonly-x">x</a></code> value to <var>position</var>’s x dictionary member, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-y" id="ref-for-dom-dompointreadonly-y①">y</a></code> value to <var>position</var>’s y dictionary member, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-z" id="ref-for-dom-dompointreadonly-z">z</a></code> value to <var>position</var>’s z dictionary member and <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w②">w</a></code> to <code>1.0</code>.</p>
     <li data-md>
      <p>Initialize <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑥">orientation</a></code> as follows:</p>
      <dl class="switch">
       <dt> If <var>orientation</var> is not a <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit③">DOMPointInit</a></code> 
       <dd> Initialize <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑦">orientation</a></code> to <code>{ x: 0.0, y: 0.0, z: 0.0, w: 1.0 }</code>. 
       <dt> Else 
       <dd> Initialize <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑧">orientation</a></code>’s <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-x" id="ref-for-dom-dompointreadonly-x①">x</a></code> value to <var>orientation</var>’s x dictionary member, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-y" id="ref-for-dom-dompointreadonly-y②">y</a></code> value to <var>orientation</var>’s y dictionary member, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-z" id="ref-for-dom-dompointreadonly-z①">z</a></code> value to <var>orientation</var>’s z dictionary member and <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w③">w</a></code> value to <var>orientation</var>’s w dictionary member. 
      </dl>
     <li data-md>
      <p>Initialize <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix">internal matrix</a> to <code>null</code>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#normalize" id="ref-for-normalize">Normalize</a> <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-x" id="ref-for-dom-dompointreadonly-x②">x</a></code>, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-y" id="ref-for-dom-dompointreadonly-y③">y</a></code>, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-z" id="ref-for-dom-dompointreadonly-z②">z</a></code>, and <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w④">w</a></code> components of <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑨">orientation</a></code>.</p>
     <li data-md>
      <p>Return <var>transform</var>.</p>
    </ol>
   </div>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="attribute" data-export id="dom-xrrigidtransform-position"><code>position</code></dfn> attribute is a 3-dimensional point, given in meters, describing the translation component of the transform. The <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑧">position</a></code>'s <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w⑤">w</a></code> attribute MUST be <code>1.0</code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="attribute" data-export id="dom-xrrigidtransform-orientation"><code>orientation</code></dfn> attribute is a quaternion describing the rotational component of the transform. The <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⓪">orientation</a></code> MUST be normalized to have a length of <code>1.0</code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="attribute" data-export id="dom-xrrigidtransform-matrix"><code>matrix</code></dfn> attribute returns the transform described by the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑨">position</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①①">orientation</a></code> attributes as a <a data-link-type="dfn" href="#matrix" id="ref-for-matrix③">matrix</a>. This attribute MUST be computed by <a data-link-type="dfn" href="#xrrigidtransform-obtain-the-matrix" id="ref-for-xrrigidtransform-obtain-the-matrix">obtaining the matrix</a> for the <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①①">XRRigidTransform</a></code>.</p>
   <p class="note" role="note"><span>Note:</span> This matrix when premultiplied onto a column vector will rotate the vector by the 3D rotation described by <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①②">orientation</a></code>, and then translate it by <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⓪">position</a></code>. Mathematically in column-vector notation, this is <code>M = T * R</code>, where <code>T</code> is a translation matrix corresponding to <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①①">position</a></code> and <code>R</code> is a rotation matrix corresponding to <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①③">orientation</a></code>.</p>
   <div class="algorithm" data-algorithm="obtain-xrrigidtransform-matrix">
    <p>To <dfn class="dfn-paneled" data-dfn-for="XRRigidTransform" data-dfn-type="dfn" data-noexport id="xrrigidtransform-obtain-the-matrix">obtain the matrix</dfn> for a given <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①②">XRRigidTransform</a></code> <var>transform</var></p>
    <ol>
     <li data-md>
      <p>If <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix①">internal matrix</a> is not <code>null</code>, perform the following steps:</p>
      <ol>
       <li data-md>
        <p>If the operation <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-isdetachedbuffer" id="ref-for-sec-isdetachedbuffer①">IsDetachedBuffer</a></code> on <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix②">internal matrix</a> is <code>false</code>, return <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix③">internal matrix</a>.</p>
      </ol>
     <li data-md>
      <p>Let <var>translation</var> be a new <a data-link-type="dfn" href="#matrix" id="ref-for-matrix④">matrix</a> which is a column-vector translation matrix corresponding to <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①②">position</a></code>. Mathematically, if <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①③">position</a></code> is <code>(x, y, z)</code>, this matrix is</p>
      <p><img alt="Mathematical expression for column-vector translation matrix" src="images/translation_matrix.svg"></p>
     <li data-md>
      <p>Let <var>rotation</var> be a new <a data-link-type="dfn" href="#matrix" id="ref-for-matrix⑤">matrix</a> which is a column-vector rotation matrix corresponding to <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①④">orientation</a></code>. Mathematically, if <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑤">orientation</a></code> is the unit quaternion <code>(q<sub>x</sub>, q<sub>y</sub>, q<sub>z</sub>, q<sub>w</sub>)</code>, this matrix is</p>
      <p><img alt="Mathematical expression for column-vector rotation matrix" src="images/rotation_matrix.svg"></p>
     <li data-md>
      <p>Set <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix④">internal matrix</a> to a new <a data-link-type="dfn" href="#matrix" id="ref-for-matrix⑥">matrix</a> set to the result of multiplying <var>translation</var> and <var>rotation</var> with <var>translation</var> on the left (<code>translation * rotation</code>). Mathematically, this matrix is</p>
      <p><img alt="Mathematical expression for matrix of multiplying translation and rotation with translation on the left" src="images/rigid_matrix.svg"></p>
     <li data-md>
      <p>Return <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix⑤">internal matrix</a>.</p>
    </ol>
   </div>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="attribute" data-export id="dom-xrrigidtransform-inverse"><code>inverse</code></dfn> attribute returns an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①③">XRRigidTransform</a></code> which, if applied to an object that had previously been transformed by the original <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①④">XRRigidTransform</a></code>, would undo the transform and return the object to its initial pose. This attribute SHOULD be lazily evaluated. The <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑤">XRRigidTransform</a></code> returned by <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse③">inverse</a></code> MUST return the originating <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑥">XRRigidTransform</a></code> as its <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse④">inverse</a></code>.</p>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑦">XRRigidTransform</a></code> with a <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①④">position</a></code> of <code>{ x: 0, y: 0, z: 0 w: 1 }</code> and an <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑥">orientation</a></code> of <code>{ x: 0, y: 0, z: 0, w: 1 }</code> is known as an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="identity-transform">identity transform</dfn>.</p>
   <div class="algorithm" data-algorithm="multiply transforms">
    <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="multiply transforms" data-noexport id="multiply-transforms">multiply two <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑧">XRRigidTransform</a></code>s</dfn>, <var>B</var> and <var>A</var>, the UA MUST perform the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>result</var> be a new <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑨">XRRigidTransform</a></code> object.</p>
     <li data-md>
      <p>Set <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix①">matrix</a></code> to the result of premultiplying <var>B</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix②">matrix</a></code> from the left onto <var>A</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix③">matrix</a></code>.</p>
     <li data-md>
      <p>Set <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑦">orientation</a></code> to the quaternion that describes the rotation indicated by the top left 3x3 sub-matrix of <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix④">matrix</a></code>.</p>
     <li data-md>
      <p>Set <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑤">position</a></code> to the vector given by the fourth column of <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix⑤">matrix</a></code>.</p>
     <li data-md>
      <p>Return <var>result</var>.</p>
    </ol>
    <p><var>result</var> is a transform from <var>A</var>’s source space to <var>B</var>’s destination space.</p>
    <p class="note" role="note"><span>Note:</span> This is equivalent to constructing an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform②⓪">XRRigidTransform</a></code> whose <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑧">orientation</a></code> is the composition of the orientation of <var>A</var> and <var>B</var>, and whose <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑥">position</a></code> is equal to <var>A</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑦">position</a></code> rotated by <var>B</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑨">orientation</a></code>, added to <var>B</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑧">position</a></code>.</p>
   </div>
   <h2 class="heading settled" data-level="9" id="pose"><span class="secno">9. </span><span class="content">Pose</span><a class="self-link" href="#pose"></a></h2>
   <h3 class="heading settled" data-level="9.1" id="xrpose-interface"><span class="secno">9.1. </span><span class="content">XRPose</span><a class="self-link" href="#xrpose-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑥">XRPose</a></code> describes a position and orientation in space relative to an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⑤">XRSpace</a></code>.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⓪"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrpose"><code><c- g>XRPose</c-></code></dfn> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑧"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②①"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform②"><c- g>transform</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean①"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑥"><c- g>emulatedPosition</c-></a>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRPose" data-dfn-type="attribute" data-export id="dom-xrpose-transform"><code>transform</code></dfn> attribute describes the position and orientation relative to the base <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⑥">XRSpace</a></code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRPose" data-dfn-type="attribute" data-export id="dom-xrpose-emulatedposition"><code>emulatedPosition</code></dfn> attribute is <code>false</code> when the <code class="idl"><a data-link-type="idl" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform③">transform</a></code> represents an actively tracked <a data-link-type="dfn" href="#6dof" id="ref-for-6dof⑥">6DoF</a> pose based on sensor readings, or <code>true</code> if its <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑨">position</a></code> value includes a <dfn class="dfn-paneled" data-dfn-for="XRPose" data-dfn-type="dfn" data-noexport id="xrpose-computed-offset">computed offset</dfn>, such as that provided by a neck or arm model. <a data-link-type="dfn" href="#estimated-floor-level" id="ref-for-estimated-floor-level①">Estimated floor level</a>s MUST NOT be considered when determining if an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑦">XRPose</a></code> includes a <a data-link-type="dfn" href="#xrpose-computed-offset" id="ref-for-xrpose-computed-offset">computed offset</a>.</p>
   <h3 class="heading settled" data-level="9.2" id="xrviewerpose-interface"><span class="secno">9.2. </span><span class="content">XRViewerPose</span><a class="self-link" href="#xrviewerpose-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑤">XRViewerPose</a></code> is an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑧">XRPose</a></code> describing the state of a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="viewer">viewer</dfn> of the XR scene as tracked by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑤">XR device</a>. A <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑧">viewer</a> may represent a tracked piece of hardware, the observed position of a users head relative to the hardware, or some other means of computing a series of viewpoints into the XR scene. <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑥">XRViewerPose</a></code>s can only be queried relative to an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⑥">XRReferenceSpace</a></code>. It provides, in addition to the <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑨">XRPose</a></code> values, an array of <a data-link-type="dfn" href="#view" id="ref-for-view②⓪">view</a>s which include rigid transforms to indicate the viewpoint and projection matrices. These values should be used by the application when rendering a frame of an XR scene.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①②"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrviewerpose"><code><c- g>XRViewerPose</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="#xrpose" id="ref-for-xrpose①⓪"><c- n>XRPose</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑨"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrview" id="ref-for-xrview⑨"><c- n>XRView</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRView>" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views①"><c- g>views</c-></a>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewerPose" data-dfn-type="attribute" data-export id="dom-xrviewerpose-views"><code>views</code></dfn> array is a sequence of <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⓪">XRView</a></code>s describing the viewpoints of the XR scene, relative to the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⑦">XRReferenceSpace</a></code> the <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑦">XRViewerPose</a></code> was queried with. Every <a data-link-type="dfn" href="#view" id="ref-for-view②①">view</a> of the XR scene in the array must be rendered in order to display correctly on the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑥">XR device</a>. Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①①">XRView</a></code> includes rigid transforms to indicate the viewpoint and projection matrices, and can be used to query <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport②">XRViewport</a></code>s from layers when needed.</p>
   <p class="note" role="note"><span>Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑧">XRViewerPose</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform④">transform</a></code> can be used to position graphical representations of the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑨">viewer</a> for spectator views of the scene or multi-user interaction.</p>
   <h2 class="heading settled" data-level="10" id="input"><span class="secno">10. </span><span class="content">Input</span><a class="self-link" href="#input"></a></h2>
   <h3 class="heading settled" data-level="10.1" id="xrinputsource-interface"><span class="secno">10.1. </span><span class="content">XRInputSource</span><a class="self-link" href="#xrinputsource-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑦">XRInputSource</a></code> represents an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="xr-input-source">XR input source</dfn>, which is any input mechanism which allows the user to perform targeted actions in the same virtual space as the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⓪">viewer</a>. Example <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⓪">XR input source</a>s include, but are not limited to, handheld controllers, optically tracked hands, and gaze-based input methods that operate on the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①①">viewer</a>'s pose. Input mechanisms which are not explicitly associated with the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①①">XR device</a>, such as traditional gamepads, mice, or keyboards SHOULD NOT be considered <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①①">XR input source</a>s.</p>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrhandedness"><code><c- g>XRHandedness</c-></code></dfn> {
  <dfn class="dfn-paneled idl-code" data-dfn-for="XRHandedness" data-dfn-type="enum-value" data-export id="dom-xrhandedness-none"><code><c- s>"none"</c-></code></dfn>,
  <dfn class="idl-code" data-dfn-for="XRHandedness" data-dfn-type="enum-value" data-export id="dom-xrhandedness-left"><code><c- s>"left"</c-></code><a class="self-link" href="#dom-xrhandedness-left"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="XRHandedness" data-dfn-type="enum-value" data-export id="dom-xrhandedness-right"><code><c- s>"right"</c-></code><a class="self-link" href="#dom-xrhandedness-right"></a></dfn>
};

<c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrtargetraymode"><code><c- g>XRTargetRayMode</c-></code></dfn> {
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-gaze" id="ref-for-dom-xrtargetraymode-gaze"><c- s>"gaze"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-tracked-pointer" id="ref-for-dom-xrtargetraymode-tracked-pointer"><c- s>"tracked-pointer"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-screen" id="ref-for-dom-xrtargetraymode-screen"><c- s>"screen"</c-></a>
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①③"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①②"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrinputsource"><code><c- g>XRInputSource</c-></code></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-xrhandedness" id="ref-for-enumdef-xrhandedness"><c- n>XRHandedness</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRHandedness" href="#dom-xrinputsource-handedness" id="ref-for-dom-xrinputsource-handedness①"><c- g>handedness</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-xrtargetraymode" id="ref-for-enumdef-xrtargetraymode"><c- n>XRTargetRayMode</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRTargetRayMode" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode①"><c- g>targetRayMode</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⓪"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①⑦"><c- n>XRSpace</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSpace" href="#dom-xrinputsource-targetrayspace" id="ref-for-dom-xrinputsource-targetrayspace②"><c- g>targetRaySpace</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①⑧"><c- n>XRSpace</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSpace?" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace③"><c- g>gripSpace</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①②"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString②"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMString>" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles①"><c- g>profiles</c-></a>;
};
</pre>
   <p class="note" role="note"><span>Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑧">XRInputSource</a></code> interface is also extended by the <a href="https://immersive-web.github.io/webxr-gamepads-module/">WebXR Gamepads Module</a></p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-handedness"><code>handedness</code></dfn> attribute describes which hand the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①②">XR input source</a> is associated with, if any. Input sources with no natural handedness (such as headset-mounted controls) or for which the handedness is not currently known MUST set this attribute <code class="idl"><a data-link-type="idl" href="#dom-xrhandedness-none" id="ref-for-dom-xrhandedness-none">"none"</a></code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-targetraymode"><code>targetRayMode</code></dfn> attribute describes the method used to produce the target ray, and indicates how the application should present the target ray to the user if desired.</p>
   <ul>
    <li data-md>
     <p><dfn class="dfn-paneled idl-code" data-dfn-for="XRTargetRayMode" data-dfn-type="enum-value" data-export data-lt="&quot;gaze&quot;|gaze" id="dom-xrtargetraymode-gaze"><code>gaze</code></dfn> indicates the target ray will originate at the viewer and follow the direction it is facing. (This is commonly referred to as a "gaze input" device in the context of head-mounted displays.)</p>
    <li data-md>
     <p><dfn class="dfn-paneled idl-code" data-dfn-for="XRTargetRayMode" data-dfn-type="enum-value" data-export data-lt="&quot;tracked-pointer&quot;|tracked-pointer" id="dom-xrtargetraymode-tracked-pointer"><code>tracked-pointer</code></dfn> indicates that the target ray originates from either a handheld device or other hand-tracking mechanism and represents that the user is using their hands or the held device for pointing. The orientation of the target ray relative to the tracked object MUST follow platform-specific ergonomics guidelines when available. In the absence of platform-specific guidance, the target ray SHOULD point in the same direction as the user’s index finger if it was outstretched.</p>
    <li data-md>
     <p><dfn class="dfn-paneled idl-code" data-dfn-for="XRTargetRayMode" data-dfn-type="enum-value" data-export data-lt="&quot;screen&quot;|screen" id="dom-xrtargetraymode-screen"><code>screen</code></dfn> indicates that the input source was an interaction with the canvas element associated with an inline session’s output context, such as a mouse click or touch event.</p>
   </ul>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-targetrayspace"><code>targetRaySpace</code></dfn> attribute is an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⑨">XRSpace</a></code> that has a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①③">native origin</a> tracking the position and orientation of the preferred pointing ray of the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑨">XRInputSource</a></code>, as defined by the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode②">targetRayMode</a></code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-gripspace"><code>gripSpace</code></dfn> attribute is an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②⓪">XRSpace</a></code> that has a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①④">native origin</a> tracking to the pose that should be used to render virtual objects such that they appear to be held in the user’s hand. If the user were to hold a straight rod, this <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②①">XRSpace</a></code> places the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑤">native origin</a> at the centroid of their curled fingers and where the <code>-Z</code> axis points along the length of the rod towards their thumb. The <code>X</code> axis is perpendicular to the back of the hand being described, with back of the users right hand pointing towards <code>+X</code> and the back of the user’s left hand pointing towards <code>-X</code>. The <code>Y</code> axis is implied by the relationship between the <code>X</code> and <code>Z</code> axis, with <code>+Y</code> roughly pointing in the direction of the user’s arm.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace④">gripSpace</a></code> MUST be <code>null</code> if the input source isn’t inherently trackable such as for input sources with a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode③">targetRayMode</a></code> of <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-gaze" id="ref-for-dom-xrtargetraymode-gaze①">"gaze"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-screen" id="ref-for-dom-xrtargetraymode-screen①">"screen"</a></code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-profiles"><code>profiles</code></dfn> attribute is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑧">list</a> of <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name">input profile name</a>s indicating both the prefered visual representation and behavior of the input source.</p>
   <p>An <dfn class="dfn-paneled" data-dfn-for="XRInputSource" data-dfn-type="dfn" data-noexport id="xrinputsource-input-profile-name">input profile name</dfn> is a lowercase <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString③">DOMString</a></code> containing no spaces, with separate words concatenated with a hyphen (<code>-</code>) character. A descriptive name should be chosen, using the prefered verbiage of the device vendor when possible. If the platform provides an appropriate identifier, such as a USB vendor and product ID, it MAY be used. Values that uniquely identify a single device, such as serial numbers, MUST NOT be used. The <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name①">input profile name</a> MUST NOT contain an indication of device handedness. If multiple user agents expose the same device, they SHOULD make an effort to report the same <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name②">input profile name</a>. The <a href="https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/registry">WebXR Input Profiles Registry</a> is the recommended location for managing <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name③">input profile name</a>s.</p>
   <p>Profiles are given in descending order of specificity. Any <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name④">input profile name</a>s given after the first entry in the list should provide fallback values that represent alternative representations of the device. This may include a more generic or prior version of the device, a more widely recognized device that is sufficiently similar, or a broad description of the device type (such as "generic-trigger-touchpad"). If multiple profiles are given, the layouts they describe must all represent a superset or subset of every other profile in the list.</p>
   <p>If the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑦">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode④">mode</a> is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①③">"inline"</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles②">profiles</a></code> MUST be an empty list.</p>
   <p>If the input device cannot be reliably identified, or the user agent wishes to mask the input device being used, it MAY choose to only report generic <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name⑤">input profile name</a>s or an empty list.</p>
   <p class="note" role="note"> For example, the Samsung HMD Odyssey’s controller is a design variant of the standard Windows Mixed Reality controller. Both controllers share the same input layout. As a result, the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles③">profiles</a></code> for a Samsung HMD Odyssey controller could be: <code>["samsung-odyssey", "microsoft-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]</code>. The appearance of the controller is most precisely communicated by the first profile in the list, with the second profile describing an acceptable substitute, and the last profile a generic fallback that describes the device in the roughest sense. (It’s a controller with a trigger, squeeze button, touchpad and thumbstick.) <br><br> Similarly, the Valve Index controller is backwards compatible with the HTC Vive controller, but the Index controller has additional buttons and axes. As a result, the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles④">profiles</a></code> for the Valve Index controller could be: <code>["valve-index", "htc-vive", "generic-trigger-squeeze-touchpad-thumbstick"]</code>. In this case the input layout described by the <code>"valve-index"</code> profile is a superset of the layout described by the <code>"htc-vive"</code> profile. Also, the <code>"valve-index"</code> profile indicates the precise appearance of the controller, while the <code>"htc-vive"</code> controller has a significantly different appearance. In this case the UA would have deemed that difference acceptable. And as in the first example, the last profile is a generic fallback. <br><br> (Exact strings are examples only. Actual profile names are managed in the <a href="https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/registry">WebXR Input Profiles Registry</a>.) </p>
   <p class="note" role="note"><span>Note:</span> <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⓪">XRInputSource</a></code>s in an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑧">XRSession</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-inputsources" id="ref-for-dom-xrsession-inputsources①">inputSources</a></code> array are "live". As such values within them are updated in-place. This means that it doesn’t work to save a reference to an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①①">XRInputSource</a></code>'s attribute on one frame and compare it to the same attribute in a subsequent frame to test for state changes, because they will be the same object. Therefore developers that wish to compare input state from frame to frame should copy the content of the state in question.</p>
   <p>An <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①③">XR input source</a> is a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="primary-input-source">primary input source</dfn> if it supports a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="primary-action">primary action</dfn>. The <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action">primary action</a> is a platform-specific action that, when engaged, produces <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-selectstart" id="ref-for-eventdef-xrsession-selectstart①">selectstart</a></code>, <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend①">selectend</a></code>, and <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select②">select</a></code> events. Examples of possible <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①">primary action</a>s are pressing a trigger, touchpad, or button, speaking a command, or making a hand gesture. If the platform guidelines define a recommended primary input then it should be used as the <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action②">primary action</a>, otherwise the user agent is free to select one. The device MUST support at least one <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source">primary input source</a>.</p>
   <p>An <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①④">XR input source</a> is an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="auxiliary-input-source">auxiliary input source</dfn> if it does not support a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action③">primary action</a>, for example <a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources">transient input sources</a> associated with secondary screen touches on a multitouch device.</p>
   <div class="algorithm" data-algorithm="on-input-start">
    <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑤">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑨">XRSession</a></code> <var>session</var> begins its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action④">primary action</a> the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②①">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑥">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time④">time</a> being the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑦">Queue a task</a> to <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectstart" id="ref-for-eventdef-xrsession-selectstart②">selectstart</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="on-input-end">
    <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑥">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⓪">XRSession</a></code> <var>session</var> ends its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑤">primary action</a> the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②②">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑦">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑤">time</a> being the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑧">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p><a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event①">Fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select③">select</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event②">Fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend②">selectend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
      </ol>
    </ol>
   </div>
   <p>Each <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑦">XR input source</a> MAY define a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="primary-squeeze-action">primary squeeze action</dfn>. The <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action">primary squeeze action</a> is a platform-specific action that, when engaged, produces <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeezestart" id="ref-for-eventdef-xrsession-squeezestart①">squeezestart</a></code>, <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeezeend" id="ref-for-eventdef-xrsession-squeezeend①">squeezeend</a></code>, and <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeeze" id="ref-for-eventdef-xrsession-squeeze①">squeeze</a></code> events. The <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action①">primary squeeze action</a> should be used for actions roughly mapping to squeezing or grabbing. Examples of possible <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action②">primary squeeze action</a>s are pressing a grip trigger or making a grabbing hand gesture. If the platform guidelines define a recommended primary squeeze action then it should be used as the <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action③">primary squeeze action</a>, otherwise the user agent MAY select one.</p>
   <div class="algorithm" data-algorithm="on-squeeze-start">
    <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑧">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧①">XRSession</a></code> <var>session</var> begins its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action④">primary squeeze action</a> the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②③">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑧">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑥">time</a> being the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑨">Queue a task</a> to <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event③">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-squeezestart" id="ref-for-eventdef-xrsession-squeezestart②">squeezestart</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="on-squeeze-end">
    <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑨">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧②">XRSession</a></code> <var>session</var> ends its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑤">primary squeeze action</a> the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②④">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑨">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑦">time</a> being the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⓪">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p><a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event④">Fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-squeeze" id="ref-for-eventdef-xrsession-squeeze②">squeeze</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑤">Fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-squeezeend" id="ref-for-eventdef-xrsession-squeezeend②">squeezeend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
      </ol>
    </ol>
   </div>
   <p>Sometimes platform-specific behavior can result in a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑥">primary action</a> or <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑥">primary squeeze action</a> being interrupted or cancelled. For example, a <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⓪">XR input source</a> may be removed from the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑦">XR device</a> after the <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑦">primary action</a> or <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑦">primary squeeze action</a> is started but before it ends.</p>
   <div class="algorithm" data-algorithm="on-input-cancelled">
    <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②①">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧③">XRSession</a></code> <var>session</var> has its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑧">primary action</a> cancelled the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑤">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①⓪">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑧">time</a> being the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①①">Queue a task</a> to <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑥">fire an input source event</a> an <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent">XRInputSourceEvent</a></code> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend③">selectend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="on-squeeze-cancelled">
    <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②②">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧④">XRSession</a></code> <var>session</var> has its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑧">primary squeeze action</a> cancelled the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑥">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①①">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑨">time</a> being the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①②">Queue a task</a> to <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑦">fire an input source event</a> an <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent①">XRInputSourceEvent</a></code> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-squeezeend" id="ref-for-eventdef-xrsession-squeezeend③">squeezeend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
    </ol>
   </div>
   <h3 class="heading settled" data-level="10.2" id="transient-input"><span class="secno">10.2. </span><span class="content">Transient input</span><a class="self-link" href="#transient-input"></a></h3>
   <p>Some <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①②">XR device</a>s may support <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="transient-input-sources">transient input sources</dfn>, where the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②③">XR input source</a> is only meaningful while performing a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="transient-action">transient action</dfn>, either the <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑨">primary action</a> for a <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source①">primary input source</a>, or a device-specific <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="auxiliary-action">auxiliary action</dfn> for an <a data-link-type="dfn" href="#auxiliary-input-source" id="ref-for-auxiliary-input-source">auxiliary input source</a>. An example would be mouse, touch, or stylus input against an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①④">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑤">XRSession</a></code>, which MUST produce a transient <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①②">XRInputSource</a></code> with a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode④">targetRayMode</a></code> set to <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-screen" id="ref-for-dom-xrtargetraymode-screen②">screen</a></code>, treated as a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⓪">primary action</a> for the <a href="https://www.w3.org/TR/pointerevents/#dfn-primary-pointer">Pointer Events §dfn-primary-pointer</a>, and as a non-primary <a data-link-type="dfn" href="#auxiliary-action" id="ref-for-auxiliary-action">auxiliary action</a> for a non-primary pointer. <a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources①">Transient input sources</a> are only present in the session’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑦">list of active XR input sources</a> for the duration of the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action">transient action</a>.</p>
   <p><a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources②">Transient input sources</a> follow the following sequence when handling <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action①">transient actions</a> instead of the algorithms for non-transient <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①①">primary actions</a>:</p>
   <div class="algorithm" data-algorithm="on-transient-input-start">
    <p>When a <a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources③">transient input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑥">XRSession</a></code> <var>session</var> begins its <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action②">transient action</a> the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑦">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①②">session</a></code> <var>session</var> for the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①③">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p>Fire any <code>"pointerdown"</code> events produced by the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②④">XR input source</a>'s action, if necessary.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="#xrsession-add-input-source" id="ref-for-xrsession-add-input-source">Add the XR input source</a> to the <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑧">list of active XR input sources</a>.</p>
       <li data-md>
        <p>If the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action③">transient action</a> is a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①②">primary action</a>, <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑧">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectstart" id="ref-for-eventdef-xrsession-selectstart③">selectstart</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
      </ol>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="on-transient-input-end">
    <p>When a <a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources④">transient input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑦">XRSession</a></code> <var>session</var> ends its <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action④">transient action</a> the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑧">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①③">session</a></code> <var>session</var> for the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①④">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p>If the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action⑤">transient action</a> is a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①③">primary action</a>, <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑨">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select④">select</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
       <li data-md>
        <p>Fire any <code>"click"</code> events produced by the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⑤">XR input source</a>'s action, if necessary.</p>
       <li data-md>
        <p>If the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action⑥">transient action</a> is a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①④">primary action</a>, <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event①⓪">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend④">selectend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="#xrsession-remove-input-source" id="ref-for-xrsession-remove-input-source">Remove the XR input source</a> from the <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑨">list of active XR input sources</a>.</p>
       <li data-md>
        <p>Fire any <code>"pointerup"</code> events produced by the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⑥">XR input source</a>'s action, if necessary.</p>
      </ol>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="on-transient-input-cancelled">
    <p>When a <a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources⑤">transient input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑧">XRSession</a></code> <var>session</var> has its <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action⑦">transient action</a> cancelled the UA MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be a new <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑨">XRFrame</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①④">session</a></code> <var>session</var> for the time the action occurred.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⑤">Queue a task</a> to perform the following steps:</p>
      <ol>
       <li data-md>
        <p>If the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action⑧">transient action</a> is a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑤">primary action</a>, <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event①①">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend⑤">selectend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="#xrsession-remove-input-source" id="ref-for-xrsession-remove-input-source①">Remove the XR input source</a> from the <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①⓪">list of active XR input sources</a>.</p>
       <li data-md>
        <p>Fire any <code>"pointerup"</code> events produced by the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⑦">XR input source</a>'s action, if necessary.</p>
      </ol>
    </ol>
   </div>
   <h3 class="heading settled" data-level="10.3" id="xrinputsourcearray-interface"><span class="secno">10.3. </span><span class="content">XRInputSourceArray</span><a class="self-link" href="#xrinputsourcearray-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray①">XRInputSourceArray</a></code> represents a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑨">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①③">XRInputSource</a></code>s. It is used in favor of a <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-frozen-array-type" id="ref-for-dfn-frozen-array-type">frozen array type</a> when the contents of the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②⓪">list</a> are expected to change over time, such as with the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑨">XRSession</a></code> <code class="idl"><a data-link-type="idl" href="#dom-xrsession-inputsources" id="ref-for-dom-xrsession-inputsources②">inputSources</a></code> attribute.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①④"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①③"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrinputsourcearray"><code><c- g>XRInputSourceArray</c-></code></dfn> {
  <c- b>iterable</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource①④"><c- n>XRInputSource</c-></a>>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrinputsourcearray-length" id="ref-for-dom-xrinputsourcearray-length"><c- g>length</c-></a>;
  <c- b>getter</c-> <a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource①⑤"><c- n>XRInputSource</c-></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long①"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceArray/__getter__(index)" data-dfn-type="argument" data-export id="dom-xrinputsourcearray-__getter__-index-index"><code><c- g>index</c-></code><a class="self-link" href="#dom-xrinputsourcearray-__getter__-index-index"></a></dfn>);
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourceArray" data-dfn-type="attribute" data-export id="dom-xrinputsourcearray-length"><code>length</code></dfn> attribute of <code class="idl"><a data-link-type="idl" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray②">XRInputSourceArray</a></code> indicates how many <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⑥">XRInputSource</a></code>s are contained within the <code class="idl"><a data-link-type="idl" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray③">XRInputSourceArray</a></code>.</p>
   <p>The <dfn data-dfn-for="XRInputSourceArray" data-dfn-type="dfn" data-export id="xrinputsourcearray-indexed-property-getter"><a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-indexed-property-getter" id="ref-for-dfn-indexed-property-getter">indexed property getter</a><a class="self-link" href="#xrinputsourcearray-indexed-property-getter"></a></dfn> of <code class="idl"><a data-link-type="idl" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray④">XRInputSourceArray</a></code> retrieves the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⑦">XRInputSource</a></code> at the provided index.</p>
   <h2 class="heading settled" data-level="11" id="layers"><span class="secno">11. </span><span class="content">Layers</span><a class="self-link" href="#layers"></a></h2>
   <p class="note" role="note"><span>Note:</span> While this specification only defines the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑦">XRWebGLLayer</a></code> layer, future extensions to the spec are expected to add additional layer types and the image sources that they draw from.</p>
   <h3 class="heading settled" data-level="11.1" id="xrwebgllayer-interface"><span class="secno">11.1. </span><span class="content">XRWebGLLayer</span><a class="self-link" href="#xrwebgllayer-interface"></a></h3>
   <p>An <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑧">XRWebGLLayer</a></code> is a layer which provides a WebGL framebuffer to render into, enabling hardware accelerated rendering of 3D graphics to be presented on the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑧">XR device</a>.</p>
<pre class="idl highlight def"><c- b>typedef</c-> (<a class="n" data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext①"><c- n>WebGLRenderingContext</c-></a> <c- b>or</c->
         <a class="n" data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext" id="ref-for-WebGL2RenderingContext"><c- n>WebGL2RenderingContext</c-></a>) <dfn class="dfn-paneled idl-code" data-dfn-type="typedef" data-export id="typedefdef-xrwebglrenderingcontext"><code><c- g>XRWebGLRenderingContext</c-></code></dfn>;

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrwebgllayerinit"><code><c- g>XRWebGLLayerInit</c-></code></dfn> {
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean②"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="true" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-antialias"><code><c- g>antialias</c-></code></dfn> = <c- b>true</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean③"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="true" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-depth"><code><c- g>depth</c-></code></dfn> = <c- b>true</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean④"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="false" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-stencil"><code><c- g>stencil</c-></code></dfn> = <c- b>false</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑤"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="true" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-alpha"><code><c- g>alpha</c-></code></dfn> = <c- b>true</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑥"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="false" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-ignoredepthvalues"><code><c- g>ignoreDepthValues</c-></code></dfn> = <c- b>false</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double⑥"><c- b>double</c-></a> <dfn class="idl-code" data-default="1.0" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="double " id="dom-xrwebgllayerinit-framebufferscalefactor"><code><c- g>framebufferScaleFactor</c-></code><a class="self-link" href="#dom-xrwebgllayerinit-framebufferscalefactor"></a></dfn> = 1.0;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑤"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①④"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrwebgllayer"><code><c- g>XRWebGLLayer</c-></code></dfn> {
  <a class="idl-code" data-link-type="constructor" href="#dom-xrwebgllayer-xrwebgllayer" id="ref-for-dom-xrwebgllayer-xrwebgllayer"><c- g>constructor</c-></a>(<a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession⑨⓪"><c- n>XRSession</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/XRWebGLLayer(session, context, layerInit), XRWebGLLayer/constructor(session, context, layerInit), XRWebGLLayer/XRWebGLLayer(session, context), XRWebGLLayer/constructor(session, context)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-session"><code><c- g>session</c-></code><a class="self-link" href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-session"></a></dfn>,
             <a class="n" data-link-type="idl-name" href="#typedefdef-xrwebglrenderingcontext" id="ref-for-typedefdef-xrwebglrenderingcontext"><c- n>XRWebGLRenderingContext</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/XRWebGLLayer(session, context, layerInit), XRWebGLLayer/constructor(session, context, layerInit), XRWebGLLayer/XRWebGLLayer(session, context), XRWebGLLayer/constructor(session, context)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-context"><code><c- g>context</c-></code><a class="self-link" href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-context"></a></dfn>,
             <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="#dictdef-xrwebgllayerinit" id="ref-for-dictdef-xrwebgllayerinit"><c- n>XRWebGLLayerInit</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/XRWebGLLayer(session, context, layerInit), XRWebGLLayer/constructor(session, context, layerInit), XRWebGLLayer/XRWebGLLayer(session, context), XRWebGLLayer/constructor(session, context)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-layerinit"><code><c- g>layerInit</c-></code><a class="self-link" href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-layerinit"></a></dfn> = {});
  // Attributes
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑦"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrwebgllayer-antialias" id="ref-for-dom-xrwebgllayer-antialias"><c- g>antialias</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑧"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues"><c- g>ignoreDepthValues</c-></a>;

  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①③"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer"><c- n>WebGLFramebuffer</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="WebGLFramebuffer?" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer"><c- g>framebuffer</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long②"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrwebgllayer-framebufferwidth" id="ref-for-dom-xrwebgllayer-framebufferwidth"><c- g>framebufferWidth</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long③"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrwebgllayer-framebufferheight" id="ref-for-dom-xrwebgllayer-framebufferheight"><c- g>framebufferHeight</c-></a>;

  // Methods
  <a class="n" data-link-type="idl-name" href="#xrviewport" id="ref-for-xrviewport③"><c- n>XRViewport</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrwebgllayer-getviewport" id="ref-for-dom-xrwebgllayer-getviewport"><c- g>getViewport</c-></a>(<a class="n" data-link-type="idl-name" href="#xrview" id="ref-for-xrview①②"><c- n>XRView</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/getViewport(view)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-getviewport-view-view"><code><c- g>view</c-></code><a class="self-link" href="#dom-xrwebgllayer-getviewport-view-view"></a></dfn>);

  // Static Methods
  <c- b>static</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double⑦"><c- b>double</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrwebgllayer-getnativeframebufferscalefactor" id="ref-for-dom-xrwebgllayer-getnativeframebufferscalefactor"><c- g>getNativeFramebufferScaleFactor</c-></a>(<a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession⑨①"><c- n>XRSession</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/getNativeFramebufferScaleFactor(session)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-getnativeframebufferscalefactor-session-session"><code><c- g>session</c-></code><a class="self-link" href="#dom-xrwebgllayer-getnativeframebufferscalefactor-session-session"></a></dfn>);
};
</pre>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑨">XRWebGLLayer</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRWebGLLayer" data-dfn-type="dfn" data-noexport id="xrwebgllayer-context">context</dfn> object, initially <code>null</code>, which is an instance of either a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext②">WebGLRenderingContext</a></code> or a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext" id="ref-for-WebGL2RenderingContext①">WebGL2RenderingContext</a></code>.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⓪">XRWebGLLayer</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRWebGLLayer" data-dfn-type="dfn" data-noexport id="xrwebgllayer-session">session</dfn>, which is the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨②">XRSession</a></code> it was created with.</p>
   <div class="algorithm" data-algorithm="construct-webgl-layer">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="constructor" data-export data-lt="XRWebGLLayer(session, context, layerInit)|constructor(session, context, layerInit)|XRWebGLLayer(session, context)|constructor(session, context)" id="dom-xrwebgllayer-xrwebgllayer"><code>XRWebGLLayer(<var>session</var>, <var>context</var>, <var>layerInit</var>)</code></dfn> constructor MUST perform the following steps when invoked:</p>
    <ol>
     <li data-md>
      <p>Let <var>layer</var> be a new <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①①">XRWebGLLayer</a></code></p>
     <li data-md>
      <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended②">ended</a> value is <code>true</code>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①⓪">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>If <var>context</var> is lost, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①①">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>If <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②①">immersive session</a> and <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①">XR compatible</a> boolean is <code>false</code>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①②">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context①">context</a> to <var>context</var>.</p>
     <li data-md>
      <p>Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-session" id="ref-for-xrwebgllayer-session">session</a> to <var>session</var>.</p>
     <li data-md>
      <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues①">ignoreDepthValues</a></code> as follows:</p>
      <dl class="switch">
       <dt> If <var>layerInit</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-ignoredepthvalues" id="ref-for-dom-xrwebgllayerinit-ignoredepthvalues">ignoreDepthValues</a></code> value is <code>false</code> and the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor②">XR Compositor</a> will make use of depth values 
       <dd> Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues②">ignoreDepthValues</a></code> to <code>false</code> 
       <dt> Otherwise 
       <dd> Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues③">ignoreDepthValues</a></code> to <code>true</code> 
      </dl>
     <li data-md>
      <p>Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled①">composition disabled</a> boolean as follows:</p>
      <dl class="switch">
       <dt> If <var>session</var> is an <a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session③">inline session</a> 
       <dd> Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled②">composition disabled</a> to <code>true</code> 
       <dt> Otherwise 
       <dd> Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled③">composition disabled</a> boolean to <code>false</code> 
      </dl>
     <li data-md>
      <dl class="switch">
       <dt> If <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled④">composition disabled</a> boolean is <code>false</code>: 
       <dd>
        <ol>
         <li data-md>
          <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-antialias" id="ref-for-dom-xrwebgllayer-antialias①">antialias</a></code> to <var>layerInit</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-antialias" id="ref-for-dom-xrwebgllayerinit-antialias">antialias</a></code> value.</p>
         <li data-md>
          <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer①">framebuffer</a></code> to a new <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer">opaque framebuffer</a> created with <var>context</var> and <var>layerInit</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-depth" id="ref-for-dom-xrwebgllayerinit-depth">depth</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-stencil" id="ref-for-dom-xrwebgllayerinit-stencil">stencil</a></code>, and <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-alpha" id="ref-for-dom-xrwebgllayerinit-alpha">alpha</a></code> values.</p>
         <li data-md>
          <p>Allocate and initialize resources compatible with <var>session</var>’s <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑨">XR device</a>, including GPU accessible memory buffers, as required to support the compositing of <var>layer</var>.</p>
         <li data-md>
          <p>If <var>layer</var>’s resources were unable to be created for any reason, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#operationerror" id="ref-for-operationerror">OperationError</a></code> and abort these steps.</p>
        </ol>
       <dt> Otherwise 
       <dd>
        <ol>
         <li data-md>
          <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-antialias" id="ref-for-dom-xrwebgllayer-antialias②">antialias</a></code> to <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-context" id="ref-for-dom-xrwebgllayer-context">context</a></code>'s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters" id="ref-for-actual-context-parameters">actual context parameters</a> <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes">antialias</a></code> value.</p>
         <li data-md>
          <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer②">framebuffer</a></code> to <code>null</code>.</p>
        </ol>
      </dl>
     <li data-md>
      <p>Return <var>layer</var>.</p>
    </ol>
   </div>
   <p class="note" role="note"><span>Note:</span> If an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①②">XRWebGLLayer</a></code>'s <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled⑤">composition disabled</a> boolean is set to <code>true</code> all values on the <code class="idl"><a data-link-type="idl" href="#dictdef-xrwebgllayerinit" id="ref-for-dictdef-xrwebgllayerinit①">XRWebGLLayerInit</a></code> object are ignored, since the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext③">WebGLRenderingContext</a></code>'s default framebuffer was already allocated using the context’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters" id="ref-for-actual-context-parameters①">actual context parameters</a> and cannot be overridden.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-context"><code>context</code></dfn> attribute is the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext④">WebGLRenderingContext</a></code> the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①③">XRWebGLLayer</a></code> was created with.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①④">XRWebGLLayer</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRWebGLLayer" data-dfn-type="dfn" data-noexport id="xrwebgllayer-composition-disabled">composition disabled</dfn> boolean which is initially set to <code>false</code>. If set to <code>true</code> it indicates that the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑤">XRWebGLLayer</a></code> MUST NOT allocate its own <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer①">WebGLFramebuffer</a></code>, and all properties of the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑥">XRWebGLLayer</a></code> that reflect <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer③">framebuffer</a></code> properties MUST instead reflect the properties of the <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context②">context</a>'s default framebuffer.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-framebuffer"><code>framebuffer</code></dfn> attribute of an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑦">XRWebGLLayer</a></code> is an instance of a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer②">WebGLFramebuffer</a></code> which has been marked as <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①">opaque</a> if <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled⑥">composition disabled</a> is <code>false</code>, and <code>null</code> otherwise. The <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer④">framebuffer</a></code> size cannot be adjusted by the developer after the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑧">XRWebGLLayer</a></code> has been created.</p>
   <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="opaque-framebuffer">opaque framebuffer</dfn> functions identically to a standard <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer③">WebGLFramebuffer</a></code> with the following changes that make it behave more like the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2" id="ref-for-2.2">default framebuffer</a>:</p>
   <ul>
    <li data-md>
     <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer②">opaque framebuffer</a> MAY support antialiasing, even in WebGL 1.0.</p>
    <li data-md>
     <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer③">opaque framebuffer</a>'s attachments cannot be inspected or changed. Calling <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6">framebufferTexture2D</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6①">framebufferRenderbuffer</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6②">deleteFramebuffer</a></code>, or <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6③">getFramebufferAttachmentParameter</a></code> with an <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer④">opaque framebuffer</a> MUST generate an <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase①">INVALID_OPERATION</a></code> error.</p>
    <li data-md>
     <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑤">opaque framebuffer</a> is considered incomplete outside of a <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑧">requestAnimationFrame()</a></code> callback. When not in a <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑨">requestAnimationFrame()</a></code> callback calls to <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6④">checkFramebufferStatus</a></code> MUST generate a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase②">FRAMEBUFFER_UNSUPPORTED</a></code> error and attempts to clear, draw to, or read from the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑥">opaque framebuffer</a> MUST generate an <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase③">INVALID_FRAMEBUFFER_OPERATION</a></code> error.</p>
    <li data-md>
     <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑦">opaque framebuffer</a> initialized with <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-depth" id="ref-for-dom-xrwebgllayerinit-depth①">depth</a></code> <code>false</code> will not have an attached depth buffer.</p>
    <li data-md>
     <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑧">opaque framebuffer</a> initialized with <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-stencil" id="ref-for-dom-xrwebgllayerinit-stencil①">stencil</a></code> <code>false</code> will not have an attached stencil buffer.</p>
    <li data-md>
     <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑨">opaque framebuffer</a>'s color buffer will have an alpha channel if and only if <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-alpha" id="ref-for-dom-xrwebgllayerinit-alpha①">alpha</a></code> is <code>true</code>.</p>
    <li data-md>
     <p>The <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor③">XR Compositor</a> will assume the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①⓪">opaque framebuffer</a> contains colors with premultiplied alpha. This is true regardless of the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes①">premultipliedAlpha</a></code> value set in the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-context" id="ref-for-dom-xrwebgllayer-context①">context</a></code>'s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters" id="ref-for-actual-context-parameters②">actual context parameters</a>.</p>
   </ul>
   <p class="note" role="note"><span>Note:</span> User agents are not required to respect <code>true</code> values of <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-depth" id="ref-for-dom-xrwebgllayerinit-depth②">depth</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-stencil" id="ref-for-dom-xrwebgllayerinit-stencil②">stencil</a></code>, which is similar to WebGL’s behavior when <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#create-a-drawing-buffer" id="ref-for-create-a-drawing-buffer">creating a drawing buffer</a></p>
   <p>The buffers attached to an <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①①">opaque framebuffer</a> MUST be cleared to the values in the table below when first created, or prior to the processing of each <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame①">XR animation frame</a>. This is identical to the behavior of the WebGL context’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2" id="ref-for-2.2①">default framebuffer</a>.</p>
   <table class="tg">
    <thead>
     <tr>
      <th>Buffer
      <th>Clear Value
    <tbody>
     <tr>
      <td>Color
      <td>(0, 0, 0, 0)
     <tr>
      <td>Depth
      <td>1.0
     <tr>
      <td>Stencil
      <td>0
   </table>
   <p class="note" role="note"><span>Note:</span> Implementations may optimize away the required implicit clear operation of the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①②">opaque framebuffer</a> as long as a guarantee can be made that the developer cannot gain access to buffer contents from another process. For instance, if the developer performs an explicit clear then the implicit clear is not needed.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑨">XRWebGLLayer</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRWebGLLayer" data-dfn-type="dfn" data-noexport id="xrwebgllayer-target-framebuffer">target framebuffer</dfn>, which is the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer⑤">framebuffer</a></code> if <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled⑦">composition disabled</a> is <code>false</code>, and the <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context③">context</a>'s default framebuffer otherwise.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-framebufferwidth"><code>framebufferWidth</code></dfn> and <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-framebufferheight"><code>framebufferHeight</code></dfn> attributes return the width and height of the <a data-link-type="dfn" href="#xrwebgllayer-target-framebuffer" id="ref-for-xrwebgllayer-target-framebuffer">target framebuffer</a>'s attachments, respectively.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-antialias"><code>antialias</code></dfn> attribute is <code>true</code> if the <a data-link-type="dfn" href="#xrwebgllayer-target-framebuffer" id="ref-for-xrwebgllayer-target-framebuffer①">target framebuffer</a> supports antialiasing using a technique of the UAs choosing, and <code>false</code> if no antialiasing will be performed.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-ignoredepthvalues"><code>ignoreDepthValues</code></dfn> attribute, if <code>true</code>, indicates the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor④">XR Compositor</a> MUST NOT make use of values in the depth buffer attachment when rendering. When the attribute is <code>false</code> it indicates that the content of the depth buffer attachment will be used by the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor⑤">XR Compositor</a> and is expected to be representative of the scene rendered into the layer.</p>
   <p>Depth values stored in the buffer are expected to be between <code>0.0</code> and <code>1.0</code>, with <code>0.0</code> representing the distance of <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear⑧">depthNear</a></code> and <code>1.0</code> representing the distance of <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar⑧">depthFar</a></code>, with intermediate values interpolated linearly. This is the default behavior of WebGL. (See documentation for the <a href="https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glDepthRangef.xml">depthRange function</a> for additional details.))</p>
   <p class="note" role="note"><span>Note:</span> Making the scene’s depth buffer available to the compositor allows some platforms to provide quality and comfort improvements such as improved reprojection.</p>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②⓪">XRWebGLLayer</a></code> MUST have a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-viewports">list of viewports</dfn> which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②①">list</a> containing one <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4②">WebGL viewport</a> for each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①③">XRView</a></code> the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨③">XRSession</a></code> currently exposes. The viewports MUST NOT be overlapping. If <a data-link-type="dfn" href="#xrwebgllayer-composition-disabled" id="ref-for-xrwebgllayer-composition-disabled⑧">composition disabled</a> is <code>true</code>, the <a data-link-type="dfn" href="#list-of-viewports" id="ref-for-list-of-viewports">list of viewports</a> MUST contain a single <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4③">WebGL viewport</a> that covers the <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context④">context</a>'s entire default framebuffer.</p>
   <p><code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-getviewport" id="ref-for-dom-xrwebgllayer-getviewport①">getViewport()</a></code> queries the <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport④">XRViewport</a></code> the given <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①④">XRView</a></code> should use when rendering to the layer.</p>
   <div class="algorithm" data-algorithm="get-viewport">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="method" data-export id="dom-xrwebgllayer-getviewport"><code>getViewport(<var>view</var>)</code></dfn> method, when invoked on an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②①">XRWebGLLayer</a></code> <var>layer</var>, MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>frame</var> be <var>view</var>’s <a data-link-type="dfn" href="#xrview-frame" id="ref-for-xrview-frame①">frame</a>.</p>
     <li data-md>
      <p>If <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①⑤">session</a></code> is not equal to <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-session" id="ref-for-xrwebgllayer-session①">session</a>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①③">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>If <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active③">active</a> boolean is <code>false</code>, throw an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①④">InvalidStateError</a></code> and abort these steps.</p>
     <li data-md>
      <p>Let <var>glViewport</var> be the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4④">WebGL viewport</a> from the <a data-link-type="dfn" href="#list-of-viewports" id="ref-for-list-of-viewports①">list of viewports</a> associated with <var>view</var>.</p>
     <li data-md>
      <p>Let <var>viewport</var> be a new <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport⑤">XRViewport</a></code> instance.</p>
     <li data-md>
      <p>Initialize <var>viewport</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x③">x</a></code> to <var>glViewport</var>’s <code>x</code> component.</p>
     <li data-md>
      <p>Initialize <var>viewport</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y③">y</a></code> to <var>glViewport</var>’s <code>y</code> component.</p>
     <li data-md>
      <p>Initialize <var>viewport</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-width" id="ref-for-dom-xrviewport-width②">width</a></code> to <var>glViewport</var>’s <code>width</code>.</p>
     <li data-md>
      <p>Initialize <var>viewport</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-height" id="ref-for-dom-xrviewport-height②">height</a></code> to <var>glViewport</var>’s <code>height</code>.</p>
     <li data-md>
      <p>Return <var>viewport</var>.</p>
    </ol>
   </div>
   <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨④">XRSession</a></code> MUST identify a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="native-webgl-framebuffer-resolution">native WebGL framebuffer resolution</dfn>, which is the pixel resolution of a WebGL framebuffer required to match the physical pixel resolution of the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device③⓪">XR device</a>.</p>
   <div class="algorithm" data-algorithm="native-webgl-framebuffer-resolution">
    <p>The <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution">native WebGL framebuffer resolution</a> is determined by running the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>session</var> be the target <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑤">XRSession</a></code>.</p>
     <li data-md>
      <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode⑤">mode</a> value is not <code>"inline"</code>, set the <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution①">native WebGL framebuffer resolution</a> to the resolution required to have a 1:1 ratio between the pixels of a framebuffer large enough to contain all of the session’s <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑤">XRView</a></code>s and the physical screen pixels in the area of the display under the highest magnification and abort these steps. If no method exists to determine the native resolution as described, the <a data-link-type="dfn" href="#recommended-webgl-framebuffer-resolution" id="ref-for-recommended-webgl-framebuffer-resolution">recommended WebGL framebuffer resolution</a> MAY be used.</p>
     <li data-md>
      <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode⑥">mode</a> value is <code>"inline"</code>, set the <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution②">native WebGL framebuffer resolution</a> to the size of the <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate④">renderState</a></code>'s <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑨">output canvas</a> in physical display pixels and reevaluate these steps every time the size of the canvas changes or the <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas①⓪">output canvas</a> is changed.</p>
    </ol>
   </div>
   <p>Additionally, the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑥">XRSession</a></code> MUST identify a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="recommended-webgl-framebuffer-resolution">recommended WebGL framebuffer resolution</dfn>, which represents a best estimate of the WebGL framebuffer resolution large enough to contain all of the session’s <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑥">XRView</a></code>s that provides an average application a good balance between performance and quality. It MAY be smaller than, larger than, or equal to the <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution③">native WebGL framebuffer resolution</a>.</p>
   <p class="note" role="note"><span>Note:</span> The user agent is free to use and method of its choosing to estimate the <a data-link-type="dfn" href="#recommended-webgl-framebuffer-resolution" id="ref-for-recommended-webgl-framebuffer-resolution①">recommended WebGL framebuffer resolution</a>. If there are platform-specific methods for querying a recommended size it is recommended that they be used, but not required.</p>
   <div class="algorithm" data-algorithm="get-native-framebuffer-scale-factor">
    <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="method" data-export id="dom-xrwebgllayer-getnativeframebufferscalefactor"><code>getNativeFramebufferScaleFactor(<var>session</var>)</code></dfn> method, when invoked, MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>session</var> be the target <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑦">XRSession</a></code>.</p>
     <li data-md>
      <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended③">ended</a> value is <code>true</code>, return <code>0.0</code> and abort these steps.</p>
     <li data-md>
      <p>Return the value that the <var>session</var>’s <a data-link-type="dfn" href="#recommended-webgl-framebuffer-resolution" id="ref-for-recommended-webgl-framebuffer-resolution②">recommended WebGL framebuffer resolution</a> must be multiplied by to yield the <var>session</var>’s <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution④">native WebGL framebuffer resolution</a>.</p>
    </ol>
   </div>
   <h3 class="heading settled" data-level="11.2" id="contextcompatibility"><span class="secno">11.2. </span><span class="content">WebGL Context Compatibility</span><a class="self-link" href="#contextcompatibility"></a></h3>
   <p>In order for a WebGL context to be used as a source for immersive XR imagery it must be created on a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="compatible-graphics-adapter">compatible graphics adapter</dfn> for the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①⑦">immersive XR device</a>. What is considered a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter">compatible graphics adapter</a> is platform dependent, but is understood to mean that the graphics adapter can supply imagery to the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①⑧">immersive XR device</a> without undue latency. If a WebGL context was not already created on the <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter①">compatible graphics adapter</a>, it typically must be re-created on the adapter in question before it can be used with an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②②">XRWebGLLayer</a></code>.</p>
   <p class="note" role="note"><span>Note:</span> On an XR platform with a single GPU, it can safely be assumed that the GPU is compatible with the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device①⑨">immersive XR device</a>s advertised by the platform, and thus any hardware accelerated WebGL contexts are compatible as well. On PCs with both an integrated and discrete GPU the discrete GPU is often considered the <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter②">compatible graphics adapter</a> since it generally a higher performance chip. On desktop PCs with multiple graphics adapters installed, the one with the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②⓪">immersive XR device</a> physically connected to it is likely to be considered the <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter③">compatible graphics adapter</a>.</p>
   <p class="note" role="note"><span>Note:</span> <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⑤">"inline"</a></code> sessions render using the same graphics adapter as canvases, and thus do not need <code class="idl"><a data-link-type="idl" href="#dom-webglcontextattributes-xrcompatible" id="ref-for-dom-webglcontextattributes-xrcompatible">xrCompatible</a></code> contexts.</p>
<pre class="idl highlight def"><c- b>partial</c-> <c- b>dictionary</c-> <a class="idl-code" data-link-type="dictionary" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes②"><c- g>WebGLContextAttributes</c-></a> {
    <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑨"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="false" data-dfn-for="WebGLContextAttributes" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-webglcontextattributes-xrcompatible"><code><c- g>xrCompatible</c-></code></dfn> = <c- b>false</c->;
};

<c- b>partial</c-> <c- b>interface</c-> <c- b>mixin</c-> <a class="idl-code" data-link-type="interface" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase④"><c- g>WebGLRenderingContextBase</c-></a> {
    [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#NewObject" id="ref-for-NewObject③"><c- g>NewObject</c-></a>] <c- b>Promise</c->&lt;<c- b>void</c->> <a class="idl-code" data-link-type="method" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible"><c- g>makeXRCompatible</c-></a>();
};
</pre>
   <p>When a user agent implements this specification it MUST set a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="xr-compatible">XR compatible</dfn> boolean, initially set to <code>false</code>, on every <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase⑤">WebGLRenderingContextBase</a></code>. Once the <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible②">XR compatible</a> boolean is set to <code>true</code>, the context can be used with layers for any <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑧">XRSession</a></code> requested from the current <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②①">immersive XR device</a>.</p>
   <p>The <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible③">XR compatible</a> boolean can be set either at context creation time or after context creation, potentially incurring a context loss. To set the <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible④">XR compatible</a> boolean at context creation time, the <code class="idl"><a data-link-type="idl" href="#dom-webglcontextattributes-xrcompatible" id="ref-for-dom-webglcontextattributes-xrcompatible①">xrCompatible</a></code> context creation attribute must be set to <code>true</code> when requesting a WebGL context.</p>
   <div class="algorithm" data-algorithm="create-with-compatible-xr-device">
    <p>When the <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/canvas.html#htmlcanvaselement" id="ref-for-htmlcanvaselement①">HTMLCanvasElement</a></code>'s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-getcontext" id="ref-for-dom-canvas-getcontext">getContext()</a></code> method is invoked with a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes③">WebGLContextAttributes</a></code> dictionary with <code class="idl"><a data-link-type="idl" href="#dom-webglcontextattributes-xrcompatible" id="ref-for-dom-webglcontextattributes-xrcompatible②">xrCompatible</a></code> set to <code>true</code>, run the following steps:</p>
    <ol>
     <li data-md>
      <p><a data-link-type="dfn" href="#ensures-an-immersive-xr-device-is-selected" id="ref-for-ensures-an-immersive-xr-device-is-selected②">Ensure an immersive XR device is selected</a>.</p>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②②">immersive XR device</a> is <code>null</code>:</p>
      <ol>
       <li data-md>
        <p><a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.1" id="ref-for-2.1">Create the WebGL context</a> as usual.</p>
       <li data-md>
        <p>Let <var>context</var> be the newly created WebGL context.</p>
       <li data-md>
        <p>Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑤">XR compatible</a> boolean to false.</p>
      </ol>
     <li data-md>
      <p>Otherwise:</p>
      <ol>
       <li data-md>
        <p><a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.1" id="ref-for-2.1①">Create the WebGL context</a> as usual, ensuring it is created on a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter④">compatible graphics adapter</a> for the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②③">immersive XR device</a>.</p>
       <li data-md>
        <p>Let <var>context</var> be the newly created WebGL context.</p>
       <li data-md>
        <p>Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑥">XR compatible</a> boolean to true.</p>
      </ol>
     <li data-md>
      <p>Return <var>context</var>.</p>
    </ol>
   </div>
   <div class="example" id="example-81ea8b88">
    <a class="self-link" href="#example-81ea8b88"></a> The following code creates a WebGL context that is compatible with an <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②④">immersive XR device</a> and then uses it to create an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②③">XRWebGLLayer</a></code>. 
<pre class="highlight"><c- a>function</c-> onXRSessionStarted<c- p>(</c->xrSession<c- p>)</c-> <c- p>{</c->
  <c- a>let</c-> glCanvas <c- o>=</c-> document<c- p>.</c->createElement<c- p>(</c-><c- u>"canvas"</c-><c- p>);</c->
  <c- a>let</c-> gl <c- o>=</c-> glCanvas<c- p>.</c->getContext<c- p>(</c-><c- u>"webgl"</c-><c- p>,</c-> <c- p>{</c-> xrCompatible<c- o>:</c-> <c- kc>true</c-> <c- p>});</c->

  loadWebGLResources<c- p>();</c->

  xrSession<c- p>.</c->updateRenderState<c- p>({</c-> baseLayer<c- o>:</c-> <c- k>new</c-> XRWebGLLayer<c- p>(</c->xrSession<c- p>,</c-> gl<c- p>)</c-> <c- p>});</c->
<c- p>}</c->
</pre>
   </div>
   <p>To set the <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑦">XR compatible</a> boolean after the context has been created, the <code class="idl"><a data-link-type="idl" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible①">makeXRCompatible()</a></code> method is used.</p>
   <div class="algorithm" data-algorithm="make-xr-compatible">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="WebGLRenderingContextBase" data-dfn-type="method" data-export id="dom-webglrenderingcontextbase-makexrcompatible"><code>makeXRCompatible()</code></dfn> method ensures the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase⑥">WebGLRenderingContextBase</a></code> is running on a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter⑤">compatible graphics adapter</a> for the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②⑤">immersive XR device</a>. 
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise" id="ref-for-a-new-promise④">a new Promise</a>.</p>
     <li data-md>
      <p>Let <var>context</var> be the target <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase⑦">WebGLRenderingContextBase</a></code> object.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#ensures-an-immersive-xr-device-is-selected" id="ref-for-ensures-an-immersive-xr-device-is-selected③">Ensure an immersive XR device is selected</a>.</p>
     <li data-md>
      <p>Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑧">XR compatible</a> boolean as follows:</p>
      <dl class="switch">
       <dt> If <var>context</var>’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-context-lost-flag" id="ref-for-webgl-context-lost-flag">WebGL context lost flag</a> is set 
       <dd> Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑨">XR compatible</a> boolean to <code>false</code> and <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑧">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①⑤">InvalidStateError</a></code>. 
       <dt> If the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②⑥">immersive XR device</a> is <code>null</code> 
       <dd> Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①⓪">XR compatible</a> boolean to <code>false</code> and <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑨">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①⑥">InvalidStateError</a></code>. 
       <dt> If <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①①">XR compatible</a> boolean is <code>true</code> 
       <dd> <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise⑦">Resolve</a> <var>promise</var>. 
       <dt> If <var>context</var> was created on a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter⑥">compatible graphics adapter</a> for the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②⑦">immersive XR device</a> 
       <dd> Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①②">XR compatible</a> boolean to <code>true</code> and <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise⑧">resolve</a> <var>promise</var>. 
       <dt> Otherwise 
       <dd>
         <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⑥">Queue a task</a> on the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15" id="ref-for-5.15">WebGL task source</a> to perform the following steps: 
        <ol>
         <li data-md>
          <p>Force <var>context</var> to be lost and <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#CONTEXT_LOST" id="ref-for-CONTEXT_LOST">handle the context loss</a> as described by the WebGL specification.</p>
         <li data-md>
          <p>If the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#canceled-flag" id="ref-for-canceled-flag">canceled flag</a> of the "webglcontextlost" event fired in the previous step was not set, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①⓪">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#aborterror" id="ref-for-aborterror">AbortError</a></code> and abort these steps.</p>
         <li data-md>
          <p><a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#restore-the-drawing-buffer" id="ref-for-restore-the-drawing-buffer">Restore the context</a> on a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter⑦">compatible graphics adapter</a> for the <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②⑧">immersive XR device</a>.</p>
         <li data-md>
          <p>Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①③">XR compatible</a> boolean to <code>true</code>.</p>
         <li data-md>
          <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise⑨">Resolve</a> <var>promise</var>.</p>
        </ol>
      </dl>
     <li data-md>
      <p>Return <var>promise</var>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="webgl-context-lost">
    <p>Additionally, when any WebGL <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#CONTEXT_LOST" id="ref-for-CONTEXT_LOST①">context is lost</a> run the following steps prior to firing the "webglcontextlost" event:</p>
    <ol>
     <li data-md>
      <p>Set the context’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①④">XR compatible</a> boolean to <code>false</code>.</p>
    </ol>
   </div>
   <div class="example" id="example-d1414183">
    <a class="self-link" href="#example-d1414183"></a> The following code creates an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②④">XRWebGLLayer</a></code> from a pre-existing WebGL context. 
<pre class="highlight"><c- a>let</c-> glCanvas <c- o>=</c-> document<c- p>.</c->createElement<c- p>(</c-><c- u>"canvas"</c-><c- p>);</c->
<c- a>let</c-> gl <c- o>=</c-> glCanvas<c- p>.</c->getContext<c- p>(</c-><c- u>"webgl"</c-><c- p>);</c->

loadWebGLResources<c- p>();</c->

glCanvas<c- p>.</c->addEventListener<c- p>(</c-><c- u>"webglcontextlost"</c-><c- p>,</c-> <c- p>(</c->event<c- p>)</c-> <c- p>=></c-> <c- p>{</c->
  <c- c1>// Indicates that the WebGL context can be restored.</c->
  event<c- p>.</c->canceled <c- o>=</c-> <c- kc>true</c-><c- p>;</c->
<c- p>});</c->

glCanvas<c- p>.</c->addEventListener<c- p>(</c-><c- u>"webglcontextrestored"</c-><c- p>,</c-> <c- p>(</c->event<c- p>)</c-> <c- p>=></c-> <c- p>{</c->
  <c- c1>// WebGL resources need to be re-created after a context loss.</c->
  loadWebGLResources<c- p>();</c->
<c- p>});</c->

<c- a>function</c-> onXRSessionStarted<c- p>(</c->xrSession<c- p>)</c-> <c- p>{</c->
  <c- c1>// Make sure the canvas context we want to use is compatible with the device.</c->
  <c- c1>// May trigger a context loss.</c->
  <c- k>return</c-> gl<c- p>.</c->makeXRCompatible<c- p>().</c->then<c- p>(()</c-> <c- p>=></c-> <c- p>{</c->
    <c- k>return</c-> xrSession<c- p>.</c->updateRenderState<c- p>({</c->
      baseLayer<c- o>:</c-> <c- k>new</c-> XRWebGLLayer<c- p>(</c->xrSession<c- p>,</c-> gl<c- p>)</c->
    <c- p>});</c->
  <c- p>});</c->
<c- p>}</c->
</pre>
   </div>
   <h2 class="heading settled" data-level="12" id="events"><span class="secno">12. </span><span class="content">Events</span><a class="self-link" href="#events"></a></h2>
   <h3 class="heading settled" data-level="12.1" id="xrsessionevent-interface"><span class="secno">12.1. </span><span class="content">XRSessionEvent</span><a class="self-link" href="#xrsessionevent-interface"></a></h3>
   <p><code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent①">XRSessionEvent</a></code>s are fired to indicate changes to the state of an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑨">XRSession</a></code>.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑥"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑤"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrsessionevent"><code><c- g>XRSessionEvent</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event"><c- n>Event</c-></a> {
  <dfn class="idl-code" data-dfn-for="XRSessionEvent" data-dfn-type="constructor" data-export data-lt="XRSessionEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-xrsessionevent-xrsessionevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-xrsessionevent-xrsessionevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString④"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="XRSessionEvent/XRSessionEvent(type, eventInitDict), XRSessionEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrsessionevent-xrsessionevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrsessionevent-xrsessionevent-type-eventinitdict-type"></a></dfn>, <a class="n" data-link-type="idl-name" href="#dictdef-xrsessioneventinit" id="ref-for-dictdef-xrsessioneventinit"><c- n>XRSessionEventInit</c-></a> <dfn class="idl-code" data-dfn-for="XRSessionEvent/XRSessionEvent(type, eventInitDict), XRSessionEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrsessionevent-xrsessionevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-xrsessionevent-xrsessionevent-type-eventinitdict-eventinitdict"></a></dfn>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①④"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①⓪⓪"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrsessionevent-session" id="ref-for-dom-xrsessionevent-session"><c- g>session</c-></a>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrsessioneventinit"><code><c- g>XRSessionEventInit</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit"><c- n>EventInit</c-></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①⓪①"><c- n>XRSession</c-></a> <dfn class="idl-code" data-dfn-for="XRSessionEventInit" data-dfn-type="dict-member" data-export data-type="XRSession " id="dom-xrsessioneventinit-session"><code><c- g>session</c-></code><a class="self-link" href="#dom-xrsessioneventinit-session"></a></dfn>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionEvent" data-dfn-type="attribute" data-export id="dom-xrsessionevent-session"><code>session</code></dfn> attribute indicates the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪②">XRSession</a></code> that generated the event.</p>
   <h3 class="heading settled" data-level="12.2" id="xrinputsourceevent-interface"><span class="secno">12.2. </span><span class="content">XRInputSourceEvent</span><a class="self-link" href="#xrinputsourceevent-interface"></a></h3>
   <p><code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent②">XRInputSourceEvent</a></code>s are fired to indicate changes to the state of an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⑧">XRInputSource</a></code>.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑦"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑥"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrinputsourceevent"><code><c- g>XRInputSourceEvent</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event①"><c- n>Event</c-></a> {
  <dfn class="idl-code" data-dfn-for="XRInputSourceEvent" data-dfn-type="constructor" data-export data-lt="XRInputSourceEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-xrinputsourceevent-xrinputsourceevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-xrinputsourceevent-xrinputsourceevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑤"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceEvent/XRInputSourceEvent(type, eventInitDict), XRInputSourceEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-type"></a></dfn>, <a class="n" data-link-type="idl-name" href="#dictdef-xrinputsourceeventinit" id="ref-for-dictdef-xrinputsourceeventinit"><c- n>XRInputSourceEventInit</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceEvent/XRInputSourceEvent(type, eventInitDict), XRInputSourceEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-eventinitdict"></a></dfn>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑤"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe③⓪"><c- n>XRFrame</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRFrame" href="#dom-xrinputsourceevent-frame" id="ref-for-dom-xrinputsourceevent-frame"><c- g>frame</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑥"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource①⑨"><c- n>XRInputSource</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSource" href="#dom-xrinputsourceevent-inputsource" id="ref-for-dom-xrinputsourceevent-inputsource"><c- g>inputSource</c-></a>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrinputsourceeventinit"><code><c- g>XRInputSourceEventInit</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit①"><c- n>EventInit</c-></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe③①"><c- n>XRFrame</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceEventInit" data-dfn-type="dict-member" data-export data-type="XRFrame " id="dom-xrinputsourceeventinit-frame"><code><c- g>frame</c-></code><a class="self-link" href="#dom-xrinputsourceeventinit-frame"></a></dfn>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⓪"><c- n>XRInputSource</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceEventInit" data-dfn-type="dict-member" data-export data-type="XRInputSource " id="dom-xrinputsourceeventinit-inputsource"><code><c- g>inputSource</c-></code><a class="self-link" href="#dom-xrinputsourceeventinit-inputsource"></a></dfn>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourceEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceevent-inputsource"><code>inputSource</code></dfn> attribute indicates the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②①">XRInputSource</a></code> that generated this event.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourceEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceevent-frame"><code>frame</code></dfn> attribute is an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe③②">XRFrame</a></code> that corresponds with the time that the event took place. It may represent historical data. Any <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑨">XRViewerPose</a></code> queried from the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceevent-frame" id="ref-for-dom-xrinputsourceevent-frame①">frame</a></code> MUST have an empty <code class="idl"><a data-link-type="idl" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views②">views</a></code> array.</p>
   <div class="algorithm" data-algorithm="fire-input-source-event">
    <p>When the user agent has to <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="fire-an-input-source-event">fire an input source event</dfn> with name <var>name</var>, <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe③③">XRFrame</a></code> <var>frame</var>, and <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②②">XRInputSource</a></code> <var>source</var> it MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Create an <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent③">XRInputSourceEvent</a></code> <var>event</var> with <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type" id="ref-for-dom-event-type">type</a></code> <var>name</var>, <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceevent-frame" id="ref-for-dom-xrinputsourceevent-frame②">frame</a></code> <var>frame</var>, and <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceevent-inputsource" id="ref-for-dom-xrinputsourceevent-inputsource①">inputSource</a></code> <var>source</var>.</p>
     <li data-md>
      <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active④">active</a> boolean to <code>true</code>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="#xrframe-apply-frame-updates" id="ref-for-xrframe-apply-frame-updates①">Apply frame updates</a> for <var>frame</var>.</p>
     <li data-md>
      <p><a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-dispatch" id="ref-for-concept-event-dispatch">Dispatch</a> <var>event</var> on <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①⑥">session</a></code></p>
     <li data-md>
      <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active⑤">active</a> boolean to <code>false</code>.</p>
    </ol>
   </div>
   <h3 class="heading settled" data-level="12.3" id="xrinputsourceschangeevent-interface"><span class="secno">12.3. </span><span class="content">XRInputSourcesChangeEvent</span><a class="self-link" href="#xrinputsourceschangeevent-interface"></a></h3>
   <p><code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent③">XRInputSourcesChangeEvent</a></code>s are fired to indicate changes to the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②③">XRInputSource</a></code>s that are available to an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪③">XRSession</a></code>.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑧"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑦"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrinputsourceschangeevent"><code><c- g>XRInputSourcesChangeEvent</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event②"><c- n>Event</c-></a> {
  <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEvent" data-dfn-type="constructor" data-export data-lt="XRInputSourcesChangeEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-xrinputsourceschangeevent-xrinputsourceschangeevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑥"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEvent/XRInputSourcesChangeEvent(type, eventInitDict), XRInputSourcesChangeEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-type"></a></dfn>, <a class="n" data-link-type="idl-name" href="#dictdef-xrinputsourceschangeeventinit" id="ref-for-dictdef-xrinputsourceschangeeventinit"><c- n>XRInputSourcesChangeEventInit</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEvent/XRInputSourcesChangeEvent(type, eventInitDict), XRInputSourcesChangeEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-eventinitdict"></a></dfn>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑦"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①⓪④"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrinputsourceschangeevent-session" id="ref-for-dom-xrinputsourceschangeevent-session"><c- g>session</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑧"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②④"><c- n>XRInputSource</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRInputSource>" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added②"><c- g>added</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑨"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑤"><c- n>XRInputSource</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRInputSource>" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed②"><c- g>removed</c-></a>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrinputsourceschangeeventinit"><code><c- g>XRInputSourcesChangeEventInit</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit②"><c- n>EventInit</c-></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①⓪⑤"><c- n>XRSession</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEventInit" data-dfn-type="dict-member" data-export data-type="XRSession " id="dom-xrinputsourceschangeeventinit-session"><code><c- g>session</c-></code><a class="self-link" href="#dom-xrinputsourceschangeeventinit-session"></a></dfn>;
  <c- b>required</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑥"><c- n>XRInputSource</c-></a>> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEventInit" data-dfn-type="dict-member" data-export data-type="FrozenArray<XRInputSource> " id="dom-xrinputsourceschangeeventinit-added"><code><c- g>added</c-></code><a class="self-link" href="#dom-xrinputsourceschangeeventinit-added"></a></dfn>;
  <c- b>required</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑦"><c- n>XRInputSource</c-></a>> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEventInit" data-dfn-type="dict-member" data-export data-type="FrozenArray<XRInputSource> " id="dom-xrinputsourceschangeeventinit-removed"><code><c- g>removed</c-></code><a class="self-link" href="#dom-xrinputsourceschangeeventinit-removed"></a></dfn>;

};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourcesChangeEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceschangeevent-session"><code>session</code></dfn> attribute indicates the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑥">XRSession</a></code> that generated the event.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourcesChangeEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceschangeevent-added"><code>added</code></dfn> attribute is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②②">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②⑧">XRInputSource</a></code>s that were added to the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑦">XRSession</a></code> at the time of the event.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourcesChangeEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceschangeevent-removed"><code>removed</code></dfn> attribute is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②③">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②⑨">XRInputSource</a></code>s that were removed from the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑧">XRSession</a></code> at the time of the event.</p>
   <h3 class="heading settled" data-level="12.4" id="xrreferencespaceevent-interface"><span class="secno">12.4. </span><span class="content">XRReferenceSpaceEvent</span><a class="self-link" href="#xrreferencespaceevent-interface"></a></h3>
   <p><code class="idl"><a data-link-type="idl" href="#xrreferencespaceevent" id="ref-for-xrreferencespaceevent">XRReferenceSpaceEvent</a></code>s are fired to indicate changes to the state of an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⑧">XRReferenceSpace</a></code>.</p>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑨"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑧"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrreferencespaceevent"><code><c- g>XRReferenceSpaceEvent</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event③"><c- n>Event</c-></a> {
  <dfn class="idl-code" data-dfn-for="XRReferenceSpaceEvent" data-dfn-type="constructor" data-export data-lt="XRReferenceSpaceEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-xrreferencespaceevent-xrreferencespaceevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-xrreferencespaceevent-xrreferencespaceevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑦"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="XRReferenceSpaceEvent/XRReferenceSpaceEvent(type, eventInitDict), XRReferenceSpaceEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-type"></a></dfn>, <a class="n" data-link-type="idl-name" href="#dictdef-xrreferencespaceeventinit" id="ref-for-dictdef-xrreferencespaceeventinit"><c- n>XRReferenceSpaceEventInit</c-></a> <dfn class="idl-code" data-dfn-for="XRReferenceSpaceEvent/XRReferenceSpaceEvent(type, eventInitDict), XRReferenceSpaceEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-eventinitdict"></a></dfn>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②⓪"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace②⑨"><c- n>XRReferenceSpace</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRReferenceSpace" href="#dom-xrreferencespaceevent-referencespace" id="ref-for-dom-xrreferencespaceevent-referencespace"><c- g>referenceSpace</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②②"><c- n>XRRigidTransform</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform?" href="#dom-xrreferencespaceevent-transform" id="ref-for-dom-xrreferencespaceevent-transform"><c- g>transform</c-></a>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrreferencespaceeventinit"><code><c- g>XRReferenceSpaceEventInit</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit③"><c- n>EventInit</c-></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace③⓪"><c- n>XRReferenceSpace</c-></a> <dfn class="idl-code" data-dfn-for="XRReferenceSpaceEventInit" data-dfn-type="dict-member" data-export data-type="XRReferenceSpace " id="dom-xrreferencespaceeventinit-referencespace"><code><c- g>referenceSpace</c-></code><a class="self-link" href="#dom-xrreferencespaceeventinit-referencespace"></a></dfn>;
  <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②③"><c- n>XRRigidTransform</c-></a> <dfn class="idl-code" data-dfn-for="XRReferenceSpaceEventInit" data-dfn-type="dict-member" data-export data-type="XRRigidTransform " id="dom-xrreferencespaceeventinit-transform"><code><c- g>transform</c-></code><a class="self-link" href="#dom-xrreferencespaceeventinit-transform"></a></dfn>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceEvent" data-dfn-type="attribute" data-export id="dom-xrreferencespaceevent-referencespace"><code>referenceSpace</code></dfn> attribute indicates the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③①">XRReferenceSpace</a></code> that generated this event.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceEvent" data-dfn-type="attribute" data-export id="dom-xrreferencespaceevent-transform"><code>transform</code></dfn> attribute describes the post-event position and orientation of the <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespaceevent-referencespace" id="ref-for-dom-xrreferencespaceevent-referencespace①">referenceSpace</a></code>'s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑥">native origin</a> in the pre-event coordinate system.</p>
   <h3 class="heading settled" data-level="12.5" id="event-types"><span class="secno">12.5. </span><span class="content">Event Types</span><a class="self-link" href="#event-types"></a></h3>
   <p>The user agent MUST provide the following new events. Registration for and firing of the events must follow the usual behavior of DOM4 Events.</p>
   <p>The user agent MUST fire a <dfn class="dfn-paneled idl-code" data-dfn-for="XR" data-dfn-type="event" data-export id="eventdef-xr-devicechange"><code>devicechange</code></dfn> event on the <code class="idl"><a data-link-type="idl" href="#xr" id="ref-for-xr⑧">XR</a></code> object to indicate that the availability of <a data-link-type="dfn" href="#xr-immersive-xr-device" id="ref-for-xr-immersive-xr-device②⑨">immersive XR device</a>s has been changed unless the document’s origin is not allowed to use the "xr-spatial-tracking" <a href="#feature-policy">feature policy</a>. The event MUST be of type <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#event" id="ref-for-event④">Event</a></code>.</p>
   <p>A user agent MUST dispatch a <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-visibilitychange"><code>visibilitychange</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑨">XRSession</a></code> each time the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state⑤">visibility state</a> of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⓪">XRSession</a></code> has changed. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent②">XRSessionEvent</a></code>.</p>
   <p>A user agent MUST dispatch an <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-end"><code>end</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①①">XRSession</a></code> when the session ends, either by the application or the user agent. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent③">XRSessionEvent</a></code>.</p>
   <p>A user agent MUST dispatch an <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-inputsourceschange"><code>inputsourceschange</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①②">XRSession</a></code> when the session’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①①">list of active XR input sources</a> has changed. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent④">XRInputSourcesChangeEvent</a></code>.</p>
   <p>A user agent MUST dispatch a <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-selectstart"><code>selectstart</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①③">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⓪">XRInputSource</a></code>s begins its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑥">primary action</a>. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent④">XRInputSourceEvent</a></code>.</p>
   <p>A user agent MUST dispatch a <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-selectend"><code>selectend</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①④">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③①">XRInputSource</a></code>s ends its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑦">primary action</a> or when an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③②">XRInputSource</a></code> that has begun a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑧">primary action</a> is disconnected. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑤">XRInputSourceEvent</a></code>.</p>
   <p>A user agent MUST dispatch a <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-select"><code>select</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⑤">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③③">XRInputSource</a></code>s has fully completed a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑨">primary action</a>. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑥">XRInputSourceEvent</a></code>.</p>
   <p>A user agent MUST dispatch a <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-squeezestart"><code>squeezestart</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⑥">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③④">XRInputSource</a></code>s begins its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑨">primary squeeze action</a>. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑦">XRInputSourceEvent</a></code>.</p>
   <p>A user agent MUST dispatch a <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-squeezeend"><code>squeezeend</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⑦">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⑤">XRInputSource</a></code>s ends its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action①⓪">primary squeeze action</a> or when an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⑥">XRInputSource</a></code> that has begun a <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action①①">primary squeeze action</a> is disconnected. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑧">XRInputSourceEvent</a></code>.</p>
   <p>A user agent MUST dispatch a <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-squeeze"><code>squeeze</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⑧">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⑦">XRInputSource</a></code>s has fully completed a <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action①②">primary squeeze action</a>. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑨">XRInputSourceEvent</a></code>.</p>
   <p>A user agent MUST dispatch a <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpace" data-dfn-type="event" data-export id="eventdef-xrreferencespace-reset"><code>reset</code></dfn> event on an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③②">XRReferenceSpace</a></code> when discontinuities of the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑦">native origin</a> or <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑧">effective origin</a> occur, i.e. there are significant changes in the origin’s position or orientation relative to the user’s environment. (For example: After user recalibration of their XR device or if the XR device automatically shifts its origin after losing and regaining tracking.) A <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset①">reset</a></code> event MUST also be dispatched when the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑧">boundsGeometry</a></code> changes for an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①①">XRBoundedReferenceSpace</a></code>. A <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset②">reset</a></code> event MUST NOT be dispatched if the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①②">viewer</a>'s pose experiences discontinuities but the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③③">XRReferenceSpace</a></code>'s origin physical mapping remains stable, such as when the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①③">viewer</a> momentarily loses and regains tracking within the same tracking area. A <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset③">reset</a></code> event also MUST NOT be dispatched as an <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded⑤">unbounded</a></code> reference space makes small adjustments to its <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑧">native origin</a> over time to maintain space stability near the user, if a significant discontinuity has not occurred. The event MUST be of type <code class="idl"><a data-link-type="idl" href="#xrreferencespaceevent" id="ref-for-xrreferencespaceevent①">XRReferenceSpaceEvent</a></code>, and MUST be dispatched prior to the execution of any <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame②">XR animation frame</a>s that make use of the new origin.</p>
   <p class="note" role="note"><span>Note:</span> This does mean that the session needs to hold on to strong references to any <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③④">XRReferenceSpace</a></code>s that have <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset④">reset</a></code> listeners.</p>
   <p class="note" role="note"><span>Note:</span> Jumps in <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①④">viewer</a> position can be handled by the application by observing the <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑦">emulatedPosition</a></code> boolean. If a jump in <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑤">viewer</a> position coincides with <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑧">emulatedPosition</a></code> switching from <code>true</code> to <code>false</code>, it indicates that the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑥">viewer</a> has regained tracking and their new position represents a correction from the previously emulated values. For experiences without a "teleportation" mechanic, where the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑦">viewer</a> can move through the virtual world without moving physically, this is generally the application’s desired behavior. However, if an experience does provide a "teleportation" mechanic, it may be needlessly jarring to jump the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑧">viewer</a>'s position back after tracking recovery. Instead, when such an application recovers tracking, it can simply resume the experience from the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑨">viewer</a>'s current position in the virtual world by absorbing that sudden jump in position into its teleportation offset. To do so, the developer calls <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace④">getOffsetReferenceSpace()</a></code> to create a replacement reference space with its <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑨">effective origin</a> adjusted by the amount that the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer②⓪">viewer</a>'s position jumped since the previous frame.</p>
   <h2 class="heading settled" data-level="13" id="security"><span class="secno">13. </span><span class="content">Security, Privacy, and Comfort Considerations</span><a class="self-link" href="#security"></a></h2>
   <p>The WebXR Device API provides powerful new features which bring with them several unique privacy, security, and comfort risks that user agents must take steps to mitigate.</p>
   <h3 class="heading settled" data-level="13.1" id="sensitive-information-header"><span class="secno">13.1. </span><span class="content">Sensitive Information</span><a class="self-link" href="#sensitive-information-header"></a></h3>
   <p>In the context of XR, <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="sensitive-information">sensitive information</dfn> includes, but is not limited to, user-configurable data such as interpupillary distance (IPD) and sensor-based data such as <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose①①">XRPose</a></code>s. All <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②②">immersive sessions</a> will expose some amount of sensitive data, due to the user’s pose being necessary to render anything. However, in some cases, the same sensitive information will also be exposed via <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⑥">"inline"</a></code> sessions.</p>
   <h4 class="heading settled" data-level="13.1.1" id="active-and-focused-document"><span class="secno">13.1.1. </span><span class="content">Active and focused document</span><a class="self-link" href="#active-and-focused-document"></a></h4>
    A document MUST be <a data-link-type="dfn" href="#active-and-focused" id="ref-for-active-and-focused">active and focused</a> at the time that <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information②">sensitive information</a> is requested. 
   <div class="algorithm" data-algorithm="document-is-active-and-focused">
    <p>To determine if a given <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#document" id="ref-for-document">Document</a></code> <var>document</var> is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="active-and-focused">active and focused</dfn> the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>If the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#currently-focused-area-of-a-top-level-browsing-context" id="ref-for-currently-focused-area-of-a-top-level-browsing-context">currently focused area</a> does not belong to <var>document</var>, return <code>false</code></p>
     <li data-md>
      <p>If <var>document</var> is not of the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#same-origin-domain" id="ref-for-same-origin-domain">same origin-domain</a> as the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#active-document" id="ref-for-active-document">active document</a>, return <code>false</code></p>
     <li data-md>
      <p>Return <code>true</code></p>
    </ol>
   </div>
   <h4 class="heading settled" data-level="13.1.2" id="trustworthy-documents"><span class="secno">13.1.2. </span><span class="content">Trustworthy documents and origins</span><a class="self-link" href="#trustworthy-documents"></a></h4>
    In order to expose any <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information③">sensitive information</a> the requesting document MUST be considered <a data-link-type="dfn" href="#trustworthy" id="ref-for-trustworthy">trustworthy</a>. 
   <div class="algorithm" data-algorithm="document-is-trustworthy">
    <p>To determine if a given <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#document" id="ref-for-document①">Document</a></code> <var>document</var> is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="trustworthy">trustworthy</dfn> the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>If <var>document</var> is not a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document" id="ref-for-responsible-document">responsible</a> document, return <code>false</code></p>
     <li data-md>
      <p>If <var>document</var> is not <a data-link-type="dfn" href="#active-and-focused" id="ref-for-active-and-focused①">active and focused</a>, return <code>false</code></p>
     <li data-md>
      <p>Return <code>true</code></p>
    </ol>
   </div>
   <h3 class="heading settled" data-level="13.2" id="user-intention"><span class="secno">13.2. </span><span class="content">User intention</span><a class="self-link" href="#user-intention"></a></h3>
   <p>It is often necessary to be sure of <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="user-intent">user intent</dfn> before exposing sensitive information or allowing actions with a significant effect on the user’s experience. This intent may be communicated or observed in a number of ways.</p>
   <h4 class="heading settled" data-level="13.2.1" id="user-activation"><span class="secno">13.2.1. </span><span class="content">User activation</span><a class="self-link" href="#user-activation"></a></h4>
    Events which are <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation" id="ref-for-triggered-by-user-activation①">triggered by user activation</a> MAY serve as an indication of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑧">user intent</a> in some scenarios. 
   <h4 class="heading settled" data-level="13.2.2" id="application-launch"><span class="secno">13.2.2. </span><span class="content">Launching a web application</span><a class="self-link" href="#application-launch"></a></h4>
    In some environments a page may be presented as an application, installed with the express intent of running immersive content. In that case <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="launching-a-web-application">launching a web application</dfn> MAY also serve as an indication of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑨">user intent</a>. 
   <h4 class="heading settled" data-level="13.2.3" id="user-consent"><span class="secno">13.2.3. </span><span class="content">Implicit and Explicit consent</span><a class="self-link" href="#user-consent"></a></h4>
    A user agent MAY use <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="implicit-consent">implicit consent</dfn> based, for example, on the install status of a web application or frequency and recency of visits. Given the sensitivity of XR data, caution is strongly advised when relying on implicit signals. 
   <p>It is often useful to get <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="explicit-consent">explicit consent</dfn> from the user before exposing <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information④">sensitive information</a>. When gathering explicit user consent, user agents present an explanation of what is being requested and provide users the option to decline. Requests for user consent can be presented in many visual forms based on the features being protected and user agent choice.</p>
   <h4 class="heading settled" data-level="13.2.4" id="consent-duration"><span class="secno">13.2.4. </span><span class="content">Duration of consent</span><a class="self-link" href="#consent-duration"></a></h4>
    It is recommended that once <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑤">explicit consent</a> is granted for a specific <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin">origin</a> that this consent persist until the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context①">browsing context</a> has ended. User agents may choose to lengthen or shorten this consent duration based upon implicit or explicit signals of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①⓪">user intent</a>, but implementations are advised to exercise caution when deviating from this recommendation, particularly when relying on implicit signals. For example, it may be appropriate for a web application installed with the express intent of running immersive content to persist the user’s consent, but not for an installed web application where immersive content is a secondary feature. 
   <p>Regardless of how long the user agent chooses to persist the user’s consent, <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑤">sensitive information</a> MUST only be exposed by an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⑨">XRSession</a></code> which has not <a data-link-type="dfn" href="#ended" id="ref-for-ended④">ended</a>.</p>
   <h3 class="heading settled" data-level="13.3" id="mid-session-consent"><span class="secno">13.3. </span><span class="content">Mid-session consent</span><a class="self-link" href="#mid-session-consent"></a></h3>
   <p>There are multiple non-XR APIs which cause user agents to request <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑥">explicit consent</a> to use a feature. If the user agent will request the user’s consent while there is an <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session⑥">active immersive session</a>, the user agent MUST <a data-link-type="dfn" href="#shut-down-the-session" id="ref-for-shut-down-the-session③">shut down the session</a> prior to displaying the consent request to the user. If the user’s consent for the feature had been granted prior to the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session⑦">active immersive session</a> being created the session does not need to be terminated.</p>
   <p class="note" role="note"><span>Note:</span> This limitation is to ensure that there is behavioral parity between all user agents until consensus is reached about how user agents should manage mid-session <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑦">explicit consent</a>. It is not expected to be a long term requirement.</p>
   <h3 class="heading settled" data-level="13.4" id="data-adjustments-header"><span class="secno">13.4. </span><span class="content">Data adjustments</span><a class="self-link" href="#data-adjustments-header"></a></h3>
   <p>In some cases, security and privacy threats can be mitigated through <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="data-adjustment">data adjustment</dfn>s such as throttling, quantizing, rounding, limiting, or otherwise manipulating the data reported from the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①③">XR device</a>. This may sometimes be necessary to avoid fingerprinting, even in situations when <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①①">user intent</a> has been established.  However, <a data-link-type="dfn" href="#data-adjustment" id="ref-for-data-adjustment">data adjustment</a> mitigations MUST only be used in situations which would not result in user discomfort.</p>
   <h4 class="heading settled" data-level="13.4.1" id="throttling-header"><span class="secno">13.4.1. </span><span class="content">Throttling</span><a class="self-link" href="#throttling-header"></a></h4>
    <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="throttling">Throttling</dfn> is when <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑥">sensitive information</a> is reported at a lower frequency than otherwise possible. This mitigation has the potential to reduce a site’s ability to infer user intent, infer location, or perform user profiling. However, when not used appropriately throttling runs a significant risk of causing user discomfort. In addition, under many circumstances it may be inadequate to provide a complete mitigation. 
   <h4 class="heading settled" data-level="13.4.2" id="rounding-and-friends"><span class="secno">13.4.2. </span><span class="content">Rounding, quantization, and fuzzing</span><a class="self-link" href="#rounding-and-friends"></a></h4>
    Rounding, quantization, and fuzzing are three categories of mitigations that modify the raw data that would otherwise be returned to the developer. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="rounding">Rounding</dfn> decreases the precision of data by reducing the number of digits used to express it. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="quantization">Quantization</dfn> constrains continuous data to instead report a discrete subset of values. Fuzzing is the introduction of slight, random errors into the the data. Collectively, these mitigations are useful to avoid fingerprinting, and are especially useful when doing so does not cause noticeable impact on user comfort. 
   <h4 class="heading settled" data-level="13.4.3" id="limiting-header"><span class="secno">13.4.3. </span><span class="content">Limiting</span><a class="self-link" href="#limiting-header"></a></h4>
    <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="limiting">Limiting</dfn> is when data is reported only when it is within a specific range. For example, it is possible to comfortably limit reporting positional pose data when a user has moved beyond a specific distance away from an approved location. Care should be taken to ensure that the user experience is not negatively affected when employing this mitigation. It is often desirable to avoid a 'hard stop' at the end of a range as this may cause disruptive user experiences. 
   <h3 class="heading settled" data-level="13.5" id="protected-functionality"><span class="secno">13.5. </span><span class="content">Protected functionality</span><a class="self-link" href="#protected-functionality"></a></h3>
   <p>The <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑦">sensitive information</a> exposed by the API can be divided into categories that share threat profiles and necessary protections against those threats.</p>
   <h4 class="heading settled" data-level="13.5.1" id="protect-immersiveness"><span class="secno">13.5.1. </span><span class="content">Immersiveness</span><a class="self-link" href="#protect-immersiveness"></a></h4>
    Users must be in control of when immersive sessions are created because the creation causes invasive changes on a user’s machine. For example, starting an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②③">immersive session</a> will engage the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①④">XR device</a> sensors, take over access to the device’s display, and begin presentating immersive content which may terminate another application’s access to the XR hardware. It may also incur significant power or performance overhead on some systems or trigger the launching of a status tray or storefront. 
   <div class="algorithm" data-algorithm="immersive-session-allowed">
    <p>To determine if an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="immersive-session-request-is-allowed">immersive session request is allowed</dfn> the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>If the request was not <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation" id="ref-for-triggered-by-user-activation②">triggered by user activation</a> or <a data-link-type="dfn" href="#launching-a-web-application" id="ref-for-launching-a-web-application">launching a web application</a>, return <code>false</code></p>
     <li data-md>
      <p>If the requesting document is not considered <a data-link-type="dfn" href="#trustworthy" id="ref-for-trustworthy①">trustworthy</a>, return <code>false</code></p>
     <li data-md>
      <p>If <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①②">user intent</a> to begin an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②④">immersive session</a> is not well understood, either via <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑧">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent②">implicit consent</a>, return <code>false</code></p>
     <li data-md>
      <p>Return <code>true</code></p>
    </ol>
   </div>
   <p>Starting an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⑦">"inline"</a></code> session does not implicitly carry the same requirements, though additional requirements may be imposed depending on the session’s <a data-link-type="dfn" href="#requested-features" id="ref-for-requested-features③">requested features</a>.</p>
   <div class="algorithm" data-algorithm="inline-session-allowed">
    <p>To determine if an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="inline-session-request-is-allowed">inline session request is allowed</dfn> the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>If the session request contained any <a data-link-type="dfn" href="#required-features" id="ref-for-required-features②">required features</a> or <a data-link-type="dfn" href="#optional-features" id="ref-for-optional-features①">optional features</a> and the request was not <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation" id="ref-for-triggered-by-user-activation③">triggered by user activation</a> or <a data-link-type="dfn" href="#launching-a-web-application" id="ref-for-launching-a-web-application①">launching a web application</a>, return <code>false</code></p>
     <li data-md>
      <p>If the requesting document is not <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document" id="ref-for-responsible-document①">responsible</a>, return <code>false</code></p>
     <li data-md>
      <p>Return <code>true</code></p>
    </ol>
   </div>
   <h4 class="heading settled" data-level="13.5.2" id="protect-poses"><span class="secno">13.5.2. </span><span class="content">Poses</span><a class="self-link" href="#protect-poses"></a></h4>
    When based on sensor data, <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose①②">XRPose</a></code> and <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose①⓪">XRViewerPose</a></code> will expose <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑧">sensitive information</a> that may be misused in a number of ways, including input sniffing, gaze tracking, or fingerprinting. 
   <div class="algorithm" data-algorithm="poses-allowed">
    <p>To determine if <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="poses-may-be-reported">poses may be reported</dfn> to an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②⓪">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>document</var> be the document that owns <var>session</var>.</p>
     <li data-md>
      <p>If the request does not originate from <var>document</var>, return <code>false</code>.</p>
     <li data-md>
      <p>If <var>document</var> is not <a data-link-type="dfn" href="#active-and-focused" id="ref-for-active-and-focused②">active and focused</a>, return <code>false</code>.</p>
     <li data-md>
      <p>If <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-visibilitystate" id="ref-for-dom-xrsession-visibilitystate①">visibilityState</a></code> in not <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-visible" id="ref-for-dom-xrvisibilitystate-visible②">"visible"</a></code>, return <code>false</code>.</p>
     <li data-md>
      <p>Determine if the pose data can be returned as follows:</p>
      <dl class="switch">
       <dt> If the pose data is known by the user agent to not expose fingerprintable sensor data 
       <dd> Return <code>true</code>. 
       <dt> If <a data-link-type="dfn" href="#data-adjustment" id="ref-for-data-adjustment①">data adjustments</a> will be applied to the underlying sensor data to prevent fingerprinting or profiling 
       <dd> Return <code>true</code>. 
       <dt> If <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①③">user intent</a> is well understood, either via <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑨">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent③">implicit consent</a> 
       <dd> Return <code>true</code>. 
       <dt> Otherwise 
       <dd> Return <code>false</code>. 
      </dl>
    </ol>
   </div>
   <p class="note" role="note"><span>Note:</span> The method by which a user agent determines that poses do not expose fingerprintable data is left to the user agent’s discretion.</p>
   <p>The primary difference between <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose①①">XRViewerPose</a></code> and <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose①③">XRPose</a></code> is the inclusion of <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑦">XRView</a></code> information. When more than one view is present and the physical relationship between these views is configurable by the user, the relationship between these views is considered <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑨">sensitive information</a> as it can be used to fingerprint or profile the user.</p>
   <p>If the relationship between <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑧">XRView</a></code>s could uniquely identify the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①⑤">XR device</a>, then the user agent MUST anonymize the <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑨">XRView</a></code> data to prevent fingerprinting. The method of anonymization is at the discretion of the user agent.</p>
   <p class="note" role="note"><span>Note:</span> Furthermore, if the relationship between <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②⓪">XRView</a></code>s is affected by a user-configured interpupillary distance (IPD), then it is strongly recommended that the user agent require <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①⓪">explicit consent</a> during session creation, prior to reporting any <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②①">XRView</a></code> data.</p>
   <h4 class="heading settled" data-level="13.5.3" id="protect-reference-spaces"><span class="secno">13.5.3. </span><span class="content">Reference spaces</span><a class="self-link" href="#protect-reference-spaces"></a></h4>
    Depending on the reference spaces used, several different types of <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information①⓪">sensitive information</a> may be exposed to the application. 
   <ul>
    <li data-md>
     <p>On devices which support <a data-link-type="dfn" href="#6dof" id="ref-for-6dof⑦">6DoF</a> tracking, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑧">"local"</a></code> reference spaces may be used to perform gait analysis, allowing user profiling and fingerprinting.</p>
    <li data-md>
     <p>On devices which support <a data-link-type="dfn" href="#6dof" id="ref-for-6dof⑧">6DoF</a> tracking, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑦">"local-floor"</a></code> reference spaces may be used to perform gait analysis, allowing user profiling and fingerprinting. In addition, because the <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑧">"local-floor"</a></code> reference spaces provide an established floor level, it may be possible for a site to infer the user’s height, allowing user profiling and fingerprinting.</p>
    <li data-md>
     <p><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑧">"bounded-floor"</a></code> reference spaces, when sufficiently constrained in size, do not enable developers to determine geographic location. However, because the floor level is established and users are able to walk around, it may be possible for a site to infer the user’s height or perform gait analysis, allowing user profiling and fingerprinting. In addition, it may be possible perform fingerprinting using the bounds reported by a bounded reference space.</p>
    <li data-md>
     <p><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded⑥">"unbounded"</a></code> reference spaces reveal the largest amount of spatial data and may result in user profiling and fingerprinting. For example, this data may enable determining user’s specific geographic location or to perform gait analysis.</p>
   </ul>
   <p>As a result the various reference space types have restrictions placed on their creation to ensure the <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information①①">sensitive information</a> expose is handled safely:</p>
   <p>Most reference spaces require that <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①④">user intent</a> to use the reference space is well understood, either via <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①①">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent④">implicit consent</a>. See the <a data-link-type="dfn" href="#feature-requirements" id="ref-for-feature-requirements②">feature requirements</a> table for details.</p>
   <p>Any group of <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑨">"local"</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑨">"local-floor"</a></code>, and <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑨">"bounded-floor"</a></code> reference spaces that are capable of being related to one another MUST share a common <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑨">native origin</a>; This restriction only applies when the creation of <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded⑦">"unbounded"</a></code> reference spaces has been restricted.</p>
   <div class="algorithm" data-algorithm="poses-limited">
    <p>To determine if <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="poses-must-be-limited">poses must be limited</dfn> between two spaces, <var>space</var> and <var>baseSpace</var>, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>If either <var>space</var> or <var>baseSpace</var> are an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①②">XRBoundedReferenceSpace</a></code> and the other space’s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②⓪">native origin</a>'s falls further outside the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry⑤">native bounds geometry</a> than a reasonable distance determined by the user agent, return true.</p>
     <li data-md>
      <p>If either <var>space</var> or <var>baseSpace</var> are an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③⑤">XRReferenceSpace</a></code> with a <a data-link-type="dfn" href="#xrreferencespace-type" id="ref-for-xrreferencespace-type①">type</a> of <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local①⓪">"local"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor①⓪">"local-floor"</a></code> and the distance between the spaces' <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②①">native origin</a>'s is greater than a reasonable distance determined by the user agent, return <code>true</code>.</p>
     <li data-md>
      <p>Return false.</p>
    </ol>
   </div>
   <p class="note" role="note"><span>Note:</span> Is is suggested that poses reported relative to a <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local①①">"local"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor①①">"local-floor"</a></code> reference space be <a data-link-type="dfn" href="#limiting" id="ref-for-limiting②">limited</a> to a distance of 15 meters from the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③⑥">XRReferenceSpace</a></code>'s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②②">native origin</a>.</p>
   <p class="note" role="note"><span>Note:</span> Is is suggested that poses reported relative to a <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①③">XRBoundedReferenceSpace</a></code> be <a data-link-type="dfn" href="#limiting" id="ref-for-limiting③">limited</a> to a distance of 1 meter outside the <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①④">XRBoundedReferenceSpace</a></code>'s <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry⑥">native bounds geometry</a>.</p>
   <h3 class="heading settled" data-level="13.6" id="trustedenvironment-security"><span class="secno">13.6. </span><span class="content">Trusted Environment</span><a class="self-link" href="#trustedenvironment-security"></a></h3>
   <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="trusted-ui">Trusted UI</dfn> is an interface presented by the User Agent that the user is able to interact with but the page cannot. The user agent MUST support showing <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui">trusted UI</a>.</p>
   <p>A <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui①">trusted UI</a> MUST have the following properties:</p>
   <ul>
    <li data-md>
     <p>It must not be spoofable</p>
    <li data-md>
     <p>It indicates where the request/content displayed originates from</p>
    <li data-md>
     <p>If it relies on a shared secret with the user, this shared secret cannot be observed by a mixed reality capture (e.g. it may not be a gesture that can be seen by the camera)</p>
    <li data-md>
     <p>It is consistent between immersive experiences in the same UA</p>
   </ul>
   <p>Broadly speaking, there are two options for user agents who wish to support <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui②">trusted UI</a>. One option is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="trusted-immersive-ui">trusted immersive UI</dfn>, which is a <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui③">trusted UI</a> which does not exit immersive mode. Implementing <a data-link-type="dfn" href="#trusted-immersive-ui" id="ref-for-trusted-immersive-ui">trusted immersive UI</a> can be challenging because `XRWebGLLayer` buffers fill the XR Device display and the User Agent does not typically "reserve" pixels for its own use. User agents are not required to support <a data-link-type="dfn" href="#trusted-immersive-ui" id="ref-for-trusted-immersive-ui①">trusted immersive UI</a>, they may instead temporarily pause/exit immersive mode and show non-immersive <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui④">trusted UI</a> to the user.</p>
   <div class="note" role="note">
     Note: Examples of <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑤">trusted UI</a> include: 
    <ul>
     <li data-md>
      <p>The default 2D mode browser shown when not in immersive mode</p>
     <li data-md>
      <p>A prompt shown within immersive mode which can only be interacted with via a reserved hardware button to prevent spoofing</p>
     <li data-md>
      <p>Pausing the immersive session and showing some form of native system environment in which a prompt can be shown</p>
    </ul>
   </div>
   <p>The ability to read input information (head pose, input pose, etc) poses a risk to the integrity of <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑥">trusted UI</a> as the page may use this information to snoop on the choices made by the user while interacting with the <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑦">trusted UI</a>. To prevent this risk the user agent MUST set the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state⑥">visibility state</a> of all <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②①">XRSession</a></code>s to <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden①">"hidden"</a></code> when the user is interacting with <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑧">trusted UI</a> (<a data-link-type="dfn" href="#trusted-immersive-ui" id="ref-for-trusted-immersive-ui②">immersive</a> or non-immersive) such as URL bars or system dialogs. Additionally, to prevent a malicious page from being able to monitor input on other pages the user agent MUST set the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②②">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state⑦">visibility state</a> to <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden②">"hidden"</a></code> if the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#currently-focused-area-of-a-top-level-browsing-context" id="ref-for-currently-focused-area-of-a-top-level-browsing-context①">currently focused area</a> does belong to the document which created the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②③">XRSession</a></code>.</p>
   <p>The user agent MUST use <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑨">trusted UI</a> to show permissions prompts.</p>
   <p>If the virtual environment does not consistently track the user’s head motion with low latency and at a high frame rate the user may become disoriented or physically ill. Since it is impossible to force pages to produce consistently performant and correct content the user agent MUST provide a tracked, trusted environment and an <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor⑥">XR Compositor</a> which runs asynchronously from page content. The compositor is responsible for compositing the trusted and untrusted content. If content is not performant, does not submit frames, or terminates unexpectedly the user agent should be able to continue presenting a responsive, <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui①⓪">trusted UI</a>.</p>
   <p>Additionally, page content has the ability to make users uncomfortable in ways not related to performance. Badly applied tracking, strobing colors, and content intended to offend, frighten, or intimidate are examples of content which may cause the user to want to quickly exit the XR experience. Removing the XR device in these cases may not always be a fast or practical option. To accommodate this the user agent MUST provide users with an action, such as pressing a reserved hardware button or performing a gesture, that escapes out of WebXR content and displays the user agent’s <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui①①">trusted UI</a>.</p>
   <section class="unstable">
    <h3 class="heading settled" data-level="13.7" id="contextisolation-security"><span class="secno">13.7. </span><span class="content">Context Isolation</span><a class="self-link" href="#contextisolation-security"></a></h3>
    <p>The trusted UI must be drawn by an independent rendering context whose state is isolated from any rendering contexts used by the page. (For example, any WebGL rendering contexts.) This is to prevent the page from corrupting the state of the trusted UI’s context, which may prevent it from properly rendering a tracked environment. It also prevents the possibility of the page being able to capture imagery from the trusted UI, which could lead to private information being leaked.</p>
    <p>Also, to prevent CORS-related vulnerabilities each page will see a new instance of objects returned by the API, such as <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②④">XRSession</a></code>. Attributes such as the <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context⑤">context</a> set by one page must not be able to be read by another. Similarly, methods invoked on the API MUST NOT cause an observable state change on other pages. For example: No method will be exposed that enables a system-level orientation reset, as this could be called repeatedly by a malicious page to prevent other pages from tracking properly. The user agent MUST, however, respect system-level orientation resets triggered by a user gesture or system menu.</p>
    <h3 class="heading settled" data-level="13.8" id="fingerprinting-security"><span class="secno">13.8. </span><span class="content">Fingerprinting</span><a class="self-link" href="#fingerprinting-security"></a></h3>
    <p>Given that the API describes hardware available to the user and its capabilities it will inevitably provide additional surface area for fingerprinting. While it’s impossible to completely avoid this, user agents should take steps to mitigate the issue. This spec limits reporting of available hardware to only a single device at a time, which prevents using the rare cases of multiple headsets being connected as a fingerprinting signal. Also, the devices that are reported have no string identifiers and expose very little information about the devices capabilities until an XRSession is created, which requires additional protections when <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information①②">sensitive information</a> will be exposed.</p>
   </section>
   <h2 class="heading settled" data-level="14" id="integrations"><span class="secno">14. </span><span class="content">Integrations</span><a class="self-link" href="#integrations"></a></h2>
   <h3 class="heading settled" data-level="14.1" id="feature-policy"><span class="secno">14.1. </span><span class="content">Feature Policy</span><a class="self-link" href="#feature-policy"></a></h3>
   <p>This specification defines a <a data-link-type="dfn" href="https://wicg.github.io/feature-policy/#policy-controlled-feature" id="ref-for-policy-controlled-feature">policy-controlled feature</a> that controls whether any <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②⑤">XRSession</a></code> that requires the use of spatial tracking may be returned by <code class="idl"><a data-link-type="idl" href="#dom-xr-requestsession" id="ref-for-dom-xr-requestsession④">requestSession()</a></code>, and whether support for session modes that require spatial tracking may be indicated by either <code class="idl"><a data-link-type="idl" href="#dom-xr-issessionsupported" id="ref-for-dom-xr-issessionsupported④">isSessionSupported()</a></code> or <code class="idl"><a data-link-type="idl" href="#eventdef-xr-devicechange" id="ref-for-eventdef-xr-devicechange②">devicechange</a></code> events on the <code class="idl"><a data-link-type="idl" href="#dom-navigator-xr" id="ref-for-dom-navigator-xr①">navigator.xr</a></code> object.</p>
   <p>The feature identifier for this feature is <code>"xr-spatial-tracking"</code>.</p>
   <p>The <a data-link-type="dfn" href="https://wicg.github.io/feature-policy/#default-allowlist" id="ref-for-default-allowlist">default allowlist</a> for this feature is <code>["self"]</code>.</p>
   <p class="note" role="note"><span>Note:</span> If the document’s origin is not allowed to use the <code>"xr-spatial-tracking"</code> feature policy any <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⑤">immersive sessions</a> will be blocked, because all <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⑥">immersive sessions</a> require some use of spatial tracking. <a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session④">Inline sessions</a> will still be allowed, but restricted to only using the <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer⑤">"viewer"</a></code> <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③⑦">XRReferenceSpace</a></code>.</p>
   <h2 class="heading settled" data-level="15" id="ack"><span class="secno">15. </span><span class="content">Acknowledgements</span><a class="self-link" href="#ack"></a></h2>
   <p>The following individuals have contributed to the design of the WebXR Device API specification:</p>
   <ul>
    <li data-md>
     <p><a href="mailto:cvan@mozilla.com">Chris Van Wiemeersch</a> (<a href="https://mozilla.org/">Mozilla</a>)</p>
    <li data-md>
     <p><a href="mailto:kgilbert@mozilla.com">Kearwood Gilbert</a> (<a href="https://mozilla.org/">Mozilla</a>)</p>
    <li data-md>
     <p><a href="mailto:rafael.cintron@microsoft.com">Rafael Cintron</a> (<a href="https://microsoft.com/">Microsoft</a>)</p>
    <li data-md>
     <p><a href="mailto:sebastian.sylvan@gmail.com">Sebastian Sylvan</a> (Formerly <a href="https://microsoft.com/">Microsoft</a>)</p>
   </ul>
   <p>And a special thanks to <a href="mailto:vladv@unity3d.com">Vladimir Vukicevic</a> (<a href="https://unity3d.com/">Unity</a>) for kick-starting this whole adventure!</p>
   <p id="back-to-top" role="navigation"><a href="#toc"><abbr title="Back to Top">↑</abbr></a></p>
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </main>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#3dof">3DoF</a><span>, in §1.1</span>
   <li><a href="#6dof">6DoF</a><span>, in §1.1</span>
   <li><a href="#xrframe-active">active</a><span>, in §5.1</span>
   <li><a href="#active-and-focused">active and focused</a><span>, in §13.1.1</span>
   <li><a href="#active-immersive-session">active immersive session</a><span>, in §3.2</span>
   <li><a href="#active-render-state">active render state</a><span>, in §4.1</span>
   <li>
    added
    <ul>
     <li><a href="#dom-xrinputsourceschangeevent-added">attribute for XRInputSourcesChangeEvent</a><span>, in §12.3</span>
     <li><a href="#dom-xrinputsourceschangeeventinit-added">dict-member for XRInputSourcesChangeEventInit</a><span>, in §12.3</span>
    </ul>
   <li><a href="#xrsession-add-input-source">add input source</a><span>, in §4.1</span>
   <li><a href="#dom-xrwebgllayerinit-alpha">alpha</a><span>, in §11.1</span>
   <li><a href="#xrframe-animationframe">animationFrame</a><span>, in §5.1</span>
   <li><a href="#animation-frame-callback-identifier">animation frame callback identifier</a><span>, in §4.3</span>
   <li>
    antialias
    <ul>
     <li><a href="#dom-xrwebgllayer-antialias">attribute for XRWebGLLayer</a><span>, in §11.1</span>
     <li><a href="#dom-xrwebgllayerinit-antialias">dict-member for XRWebGLLayerInit</a><span>, in §11.1</span>
    </ul>
   <li><a href="#xrframe-apply-frame-updates">apply frame updates</a><span>, in §5.1</span>
   <li><a href="#apply-the-pending-render-state">apply the pending render state</a><span>, in §4.1</span>
   <li><a href="#auxiliary-action">auxiliary action</a><span>, in §10.2</span>
   <li><a href="#auxiliary-input-source">auxiliary input source</a><span>, in §10.1</span>
   <li>
    baseLayer
    <ul>
     <li><a href="#dom-xrrenderstate-baselayer">attribute for XRRenderState</a><span>, in §4.2</span>
     <li><a href="#dom-xrrenderstateinit-baselayer">dict-member for XRRenderStateInit</a><span>, in §4.2</span>
    </ul>
   <li><a href="#dom-xrreferencespacetype-bounded-floor">"bounded-floor"</a><span>, in §6.2</span>
   <li><a href="#dom-xrreferencespacetype-bounded-floor">bounded-floor</a><span>, in §6.2</span>
   <li><a href="#bounded-reference-spaces-are-supported">bounded reference spaces are supported</a><span>, in §6.3</span>
   <li><a href="#dom-xrboundedreferencespace-boundsgeometry">boundsGeometry</a><span>, in §6.3</span>
   <li><a href="#dom-xrsession-cancelanimationframe">cancelAnimationFrame(handle)</a><span>, in §4.3</span>
   <li><a href="#xrframerequestcallback-cancelled">cancelled</a><span>, in §4.3</span>
   <li><a href="#capable-of-supporting">capable of supporting</a><span>, in §3.4</span>
   <li><a href="#xrsession-change-input-source">change input source</a><span>, in §4.1</span>
   <li><a href="#compatible-graphics-adapter">compatible graphics adapter</a><span>, in §11.2</span>
   <li>
    composition disabled
    <ul>
     <li><a href="#xrrenderstate-composition-disabled">dfn for XRRenderState</a><span>, in §4.2</span>
     <li><a href="#xrwebgllayer-composition-disabled">dfn for XRWebGLLayer</a><span>, in §11.1</span>
    </ul>
   <li><a href="#xrpose-computed-offset">computed offset</a><span>, in §9.1</span>
   <li><a href="#dom-xrrigidtransform-xrrigidtransform">constructor()</a><span>, in §8.3</span>
   <li><a href="#dom-xrrigidtransform-xrrigidtransform">constructor(position)</a><span>, in §8.3</span>
   <li><a href="#dom-xrrigidtransform-xrrigidtransform">constructor(position, orientation)</a><span>, in §8.3</span>
   <li><a href="#dom-xrwebgllayer-xrwebgllayer">constructor(session, context)</a><span>, in §11.1</span>
   <li><a href="#dom-xrwebgllayer-xrwebgllayer">constructor(session, context, layerInit)</a><span>, in §11.1</span>
   <li>
    constructor(type, eventInitDict)
    <ul>
     <li><a href="#dom-xrinputsourceevent-xrinputsourceevent">constructor for XRInputSourceEvent</a><span>, in §12.2</span>
     <li><a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent">constructor for XRInputSourcesChangeEvent</a><span>, in §12.3</span>
     <li><a href="#dom-xrreferencespaceevent-xrreferencespaceevent">constructor for XRReferenceSpaceEvent</a><span>, in §12.4</span>
     <li><a href="#dom-xrsessionevent-xrsessionevent">constructor for XRSessionEvent</a><span>, in §12.1</span>
    </ul>
   <li>
    context
    <ul>
     <li><a href="#dom-xrwebgllayer-context">attribute for XRWebGLLayer</a><span>, in §11.1</span>
     <li><a href="#xrwebgllayer-context">dfn for XRWebGLLayer</a><span>, in §11.1</span>
    </ul>
   <li><a href="#xrspace-coordinate-system">coordinate system</a><span>, in §6.1</span>
   <li><a href="#create-a-reference-space">create a reference space</a><span>, in §6.2</span>
   <li><a href="#data-adjustment">data adjustment</a><span>, in §13.4</span>
   <li><a href="#default-features">default features</a><span>, in §3.4</span>
   <li><a href="#dom-xrwebgllayerinit-depth">depth</a><span>, in §11.1</span>
   <li>
    depthFar
    <ul>
     <li><a href="#dom-xrrenderstate-depthfar">attribute for XRRenderState</a><span>, in §4.2</span>
     <li><a href="#dom-xrrenderstateinit-depthfar">dict-member for XRRenderStateInit</a><span>, in §4.2</span>
    </ul>
   <li>
    depthNear
    <ul>
     <li><a href="#dom-xrrenderstate-depthnear">attribute for XRRenderState</a><span>, in §4.2</span>
     <li><a href="#dom-xrrenderstateinit-depthnear">dict-member for XRRenderStateInit</a><span>, in §4.2</span>
    </ul>
   <li><a href="#eventdef-xr-devicechange">devicechange</a><span>, in §12.5</span>
   <li><a href="#xrspace-effective-origin">effective origin</a><span>, in §6.1</span>
   <li><a href="#dom-xrpose-emulatedposition">emulatedPosition</a><span>, in §9.1</span>
   <li><a href="#eventdef-xrsession-end">end</a><span>, in §12.5</span>
   <li><a href="#dom-xrsession-end">end()</a><span>, in §4.1</span>
   <li><a href="#ended">ended</a><span>, in §4.1</span>
   <li><a href="#ensures-an-immersive-xr-device-is-selected">ensures an immersive XR device is selected</a><span>, in §3.2</span>
   <li><a href="#enumerate-immersive-xr-devices">enumerate immersive XR devices</a><span>, in §3.2</span>
   <li><a href="#estimated-floor-level">estimated floor level</a><span>, in §6.2</span>
   <li><a href="#exclusive-access">exclusive access</a><span>, in §3.3</span>
   <li><a href="#explicit-consent">explicit consent</a><span>, in §13.2.3</span>
   <li>
    eye
    <ul>
     <li><a href="#dom-xrview-eye">attribute for XRView</a><span>, in §7.1</span>
     <li><a href="#view-eye">dfn for view</a><span>, in §7.1</span>
    </ul>
   <li><a href="#feature-descriptor">feature descriptor</a><span>, in §3.4</span>
   <li><a href="#feature-requirements">feature requirements</a><span>, in §3.4</span>
   <li><a href="#fire-an-input-source-event">fire an input source event</a><span>, in §12.2</span>
   <li>
    frame
    <ul>
     <li><a href="#dom-xrinputsourceevent-frame">attribute for XRInputSourceEvent</a><span>, in §12.2</span>
     <li><a href="#xrview-frame">dfn for XRView</a><span>, in §7.1</span>
     <li><a href="#dom-xrinputsourceeventinit-frame">dict-member for XRInputSourceEventInit</a><span>, in §12.2</span>
    </ul>
   <li><a href="#dom-xrwebgllayer-framebuffer">framebuffer</a><span>, in §11.1</span>
   <li><a href="#dom-xrwebgllayer-framebufferheight">framebufferHeight</a><span>, in §11.1</span>
   <li><a href="#dom-xrwebgllayerinit-framebufferscalefactor">framebufferScaleFactor</a><span>, in §11.1</span>
   <li><a href="#dom-xrwebgllayer-framebufferwidth">framebufferWidth</a><span>, in §11.1</span>
   <li><a href="#frame-update">frame update</a><span>, in §5.1</span>
   <li><a href="#dom-xrtargetraymode-gaze">"gaze"</a><span>, in §10.1</span>
   <li><a href="#dom-xrtargetraymode-gaze">gaze</a><span>, in §10.1</span>
   <li><a href="#dom-xrwebgllayer-getnativeframebufferscalefactor">getNativeFramebufferScaleFactor(session)</a><span>, in §11.1</span>
   <li><a href="#dom-xrreferencespace-getoffsetreferencespace">getOffsetReferenceSpace(originOffset)</a><span>, in §6.2</span>
   <li><a href="#dom-xrframe-getpose">getPose(space, baseSpace)</a><span>, in §5.1</span>
   <li><a href="#dom-xrframe-getviewerpose">getViewerPose(referenceSpace)</a><span>, in §5.1</span>
   <li><a href="#dom-xrwebgllayer-getviewport">getViewport(view)</a><span>, in §11.1</span>
   <li><a href="#dom-xrinputsource-gripspace">gripSpace</a><span>, in §10.1</span>
   <li><a href="#dom-xrinputsource-handedness">handedness</a><span>, in §10.1</span>
   <li><a href="#dom-xrviewport-height">height</a><span>, in §7.2</span>
   <li><a href="#dom-xrvisibilitystate-hidden">hidden</a><span>, in §4.1</span>
   <li><a href="#dom-xrvisibilitystate-hidden">"hidden"</a><span>, in §4.1</span>
   <li><a href="#identity-transform">identity transform</a><span>, in §8.3</span>
   <li>
    ignoreDepthValues
    <ul>
     <li><a href="#dom-xrwebgllayer-ignoredepthvalues">attribute for XRWebGLLayer</a><span>, in §11.1</span>
     <li><a href="#dom-xrwebgllayerinit-ignoredepthvalues">dict-member for XRWebGLLayerInit</a><span>, in §11.1</span>
    </ul>
   <li><a href="#dom-xrsessionmode-immersive-ar">"immersive-ar"</a><span>, in §3.3</span>
   <li><a href="#dom-xrsessionmode-immersive-ar">immersive-ar</a><span>, in §3.3</span>
   <li><a href="#immersive-session">immersive session</a><span>, in §3.3</span>
   <li><a href="#immersive-session-request-is-allowed">immersive session request is allowed</a><span>, in §13.5.1</span>
   <li><a href="#dom-xrsessionmode-immersive-vr">immersive-vr</a><span>, in §3.3</span>
   <li><a href="#dom-xrsessionmode-immersive-vr">"immersive-vr"</a><span>, in §3.3</span>
   <li><a href="#xr-immersive-xr-device">immersive XR device</a><span>, in §3.2</span>
   <li><a href="#implicit-consent">implicit consent</a><span>, in §13.2.3</span>
   <li><a href="#xrinputsourcearray-indexed-property-getter">indexed property getter</a><span>, in §10.3</span>
   <li><a href="#initialize-the-render-state">initialize the render state</a><span>, in §4.2</span>
   <li><a href="#initialize-the-session">initialize the session</a><span>, in §4.1</span>
   <li><a href="#dom-xrsessionmode-inline">"inline"</a><span>, in §3.3</span>
   <li><a href="#dom-xrsessionmode-inline">inline</a><span>, in §3.3</span>
   <li><a href="#inline-session">inline session</a><span>, in §3.3</span>
   <li><a href="#inline-session-request-is-allowed">inline session request is allowed</a><span>, in §13.5.1</span>
   <li>
    inlineVerticalFieldOfView
    <ul>
     <li><a href="#dom-xrrenderstate-inlineverticalfieldofview">attribute for XRRenderState</a><span>, in §4.2</span>
     <li><a href="#dom-xrrenderstateinit-inlineverticalfieldofview">dict-member for XRRenderStateInit</a><span>, in §4.2</span>
    </ul>
   <li><a href="#inline-xr-device">inline XR device</a><span>, in §2.1</span>
   <li><a href="#xrinputsource-input-profile-name">input profile name</a><span>, in §10.1</span>
   <li>
    inputSource
    <ul>
     <li><a href="#dom-xrinputsourceevent-inputsource">attribute for XRInputSourceEvent</a><span>, in §12.2</span>
     <li><a href="#dom-xrinputsourceeventinit-inputsource">dict-member for XRInputSourceEventInit</a><span>, in §12.2</span>
    </ul>
   <li><a href="#dom-xrsession-inputsources">inputSources</a><span>, in §4.1</span>
   <li><a href="#eventdef-xrsession-inputsourceschange">inputsourceschange</a><span>, in §12.5</span>
   <li><a href="#xrrigidtransform-internal-matrix">internal matrix</a><span>, in §8.3</span>
   <li><a href="#xrview-internal-projection-matrix">internal projection matrix</a><span>, in §7.1</span>
   <li><a href="#dom-xrrigidtransform-inverse">inverse</a><span>, in §8.3</span>
   <li><a href="#dom-xr-issessionsupported">isSessionSupported(mode)</a><span>, in §3.2</span>
   <li><a href="#launching-a-web-application">launching a web application</a><span>, in §13.2.2</span>
   <li>
    "left"
    <ul>
     <li><a href="#dom-xreye-left">enum-value for XREye</a><span>, in §7.1</span>
     <li><a href="#dom-xrhandedness-left">enum-value for XRHandedness</a><span>, in §10.1</span>
    </ul>
   <li><a href="#dom-xrinputsourcearray-length">length</a><span>, in §10.3</span>
   <li><a href="#limiting">Limiting</a><span>, in §13.4.3</span>
   <li><a href="#list-of-active-xr-input-sources">list of active XR input sources</a><span>, in §4.1</span>
   <li><a href="#list-of-animation-frame-callbacks">list of animation frame callbacks</a><span>, in §4.3</span>
   <li><a href="#xrsession-list-of-enabled-features">list of enabled features</a><span>, in §4.1</span>
   <li><a href="#xrsession-list-of-frame-updates">list of frame updates</a><span>, in §5.1</span>
   <li><a href="#list-of-immersive-xr-devices">list of immersive XR devices</a><span>, in §3.2</span>
   <li><a href="#list-of-inline-sessions">list of inline sessions</a><span>, in §3.2</span>
   <li><a href="#list-of-supported-modes">list of supported modes</a><span>, in §2.1</span>
   <li><a href="#list-of-viewports">list of viewports</a><span>, in §11.1</span>
   <li><a href="#xrsession-viewer-reference-space-list-of-views">list of views</a><span>, in §4.1</span>
   <li><a href="#dom-xrreferencespacetype-local">"local"</a><span>, in §6.2</span>
   <li><a href="#dom-xrreferencespacetype-local">local</a><span>, in §6.2</span>
   <li><a href="#dom-xrreferencespacetype-local-floor">"local-floor"</a><span>, in §6.2</span>
   <li><a href="#dom-xrreferencespacetype-local-floor">local-floor</a><span>, in §6.2</span>
   <li><a href="#dom-webglrenderingcontextbase-makexrcompatible">makeXRCompatible()</a><span>, in §11.2</span>
   <li>
    matrix
    <ul>
     <li><a href="#dom-xrrigidtransform-matrix">attribute for XRRigidTransform</a><span>, in §8.3</span>
     <li><a href="#matrix">definition of</a><span>, in §8.1</span>
    </ul>
   <li><a href="#maximum-far-clip-plane">maximum far clip plane</a><span>, in §4.1</span>
   <li><a href="#maximum-inline-field-of-view">maximum inline field of view</a><span>, in §4.1</span>
   <li><a href="#minimum-inline-field-of-view">minimum inline field of view</a><span>, in §4.1</span>
   <li><a href="#minimum-near-clip-plane">minimum near clip plane</a><span>, in §4.1</span>
   <li><a href="#xrsession-mode">mode</a><span>, in §4.1</span>
   <li><a href="#multiply-transforms">multiply transforms</a><span>, in §8.3</span>
   <li><a href="#xrboundedreferencespace-native-bounds-geometry">native bounds geometry</a><span>, in §6.3</span>
   <li><a href="#xrspace-native-origin">native origin</a><span>, in §6.1</span>
   <li><a href="#native-webgl-framebuffer-resolution">native WebGL framebuffer resolution</a><span>, in §11.1</span>
   <li>
    "none"
    <ul>
     <li><a href="#dom-xreye-none">enum-value for XREye</a><span>, in §7.1</span>
     <li><a href="#dom-xrhandedness-none">enum-value for XRHandedness</a><span>, in §10.1</span>
    </ul>
   <li><a href="#normalize">normalize</a><span>, in §8.2</span>
   <li><a href="#xrrigidtransform-obtain-the-matrix">obtain the matrix</a><span>, in §8.3</span>
   <li><a href="#xrview-obtain-the-projection-matrix">obtain the projection matrix</a><span>, in §7.1</span>
   <li><a href="#dom-xr-ondevicechange">ondevicechange</a><span>, in §3.2</span>
   <li><a href="#dom-xrsession-onend">onend</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-oninputsourceschange">oninputsourceschange</a><span>, in §4.1</span>
   <li><a href="#dom-xrreferencespace-onreset">onreset</a><span>, in §6.2</span>
   <li><a href="#dom-xrsession-onselect">onselect</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-onselectend">onselectend</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-onselectstart">onselectstart</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-onsqueeze">onsqueeze</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-onsqueezeend">onsqueezeend</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-onsqueezestart">onsqueezestart</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-onvisibilitychange">onvisibilitychange</a><span>, in §4.1</span>
   <li><a href="#opaque-framebuffer">opaque framebuffer</a><span>, in §11.1</span>
   <li><a href="#dom-xrsessioninit-optionalfeatures">optionalFeatures</a><span>, in §3.4</span>
   <li><a href="#optional-features">Optional features</a><span>, in §3.4</span>
   <li><a href="#dom-xrrigidtransform-orientation">orientation</a><span>, in §8.3</span>
   <li><a href="#xrspace-origin-offset">origin offset</a><span>, in §6.1</span>
   <li><a href="#xrrenderstate-output-canvas">output canvas</a><span>, in §4.2</span>
   <li><a href="#pending-immersive-session">pending immersive session</a><span>, in §3.2</span>
   <li><a href="#pending-render-state">pending render state</a><span>, in §4.1</span>
   <li><a href="#populate-the-pose">populate the pose</a><span>, in §6.1</span>
   <li><a href="#poses-may-be-reported">poses may be reported</a><span>, in §13.5.2</span>
   <li><a href="#poses-must-be-limited">poses must be limited</a><span>, in §13.5.3</span>
   <li><a href="#dom-xrrigidtransform-position">position</a><span>, in §8.3</span>
   <li><a href="#primary-action">primary action</a><span>, in §10.1</span>
   <li><a href="#primary-input-source">primary input source</a><span>, in §10.1</span>
   <li><a href="#primary-squeeze-action">primary squeeze action</a><span>, in §10.1</span>
   <li><a href="#dom-xrinputsource-profiles">profiles</a><span>, in §10.1</span>
   <li><a href="#view-projection-matrix">projection matrix</a><span>, in §7.1</span>
   <li><a href="#dom-xrview-projectionmatrix">projectionMatrix</a><span>, in §7.1</span>
   <li><a href="#quantization">Quantization</a><span>, in §13.4.2</span>
   <li><a href="#recommended-webgl-framebuffer-resolution">recommended WebGL framebuffer resolution</a><span>, in §11.1</span>
   <li>
    referenceSpace
    <ul>
     <li><a href="#dom-xrreferencespaceevent-referencespace">attribute for XRReferenceSpaceEvent</a><span>, in §12.4</span>
     <li><a href="#dom-xrreferencespaceeventinit-referencespace">dict-member for XRReferenceSpaceEventInit</a><span>, in §12.4</span>
    </ul>
   <li><a href="#reference-space-is-supported">reference space is supported</a><span>, in §6.2</span>
   <li>
    removed
    <ul>
     <li><a href="#dom-xrinputsourceschangeevent-removed">attribute for XRInputSourcesChangeEvent</a><span>, in §12.3</span>
     <li><a href="#dom-xrinputsourceschangeeventinit-removed">dict-member for XRInputSourcesChangeEventInit</a><span>, in §12.3</span>
    </ul>
   <li><a href="#xrsession-remove-input-source">remove input source</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-renderstate">renderState</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-requestanimationframe">requestAnimationFrame(callback)</a><span>, in §4.3</span>
   <li><a href="#requested-features">requested features</a><span>, in §3.4</span>
   <li><a href="#dom-xrsession-requestreferencespace">requestReferenceSpace(type)</a><span>, in §4.1</span>
   <li><a href="#dom-xr-requestsession">requestSession(mode)</a><span>, in §3.2</span>
   <li><a href="#dom-xr-requestsession">requestSession(mode, options)</a><span>, in §3.2</span>
   <li><a href="#required-features">required features</a><span>, in §3.4</span>
   <li><a href="#dom-xrsessioninit-requiredfeatures">requiredFeatures</a><span>, in §3.4</span>
   <li><a href="#eventdef-xrreferencespace-reset">reset</a><span>, in §12.5</span>
   <li><a href="#resolve-the-requested-features">resolve the requested features</a><span>, in §3.4</span>
   <li>
    "right"
    <ul>
     <li><a href="#dom-xreye-right">enum-value for XREye</a><span>, in §7.1</span>
     <li><a href="#dom-xrhandedness-right">enum-value for XRHandedness</a><span>, in §10.1</span>
    </ul>
   <li><a href="#rounding">Rounding</a><span>, in §13.4.2</span>
   <li><a href="#dom-xrtargetraymode-screen">screen</a><span>, in §10.1</span>
   <li><a href="#dom-xrtargetraymode-screen">"screen"</a><span>, in §10.1</span>
   <li><a href="#eventdef-xrsession-select">select</a><span>, in §12.5</span>
   <li><a href="#select-an-immersive-xr-device">select an immersive XR device</a><span>, in §3.2</span>
   <li><a href="#eventdef-xrsession-selectend">selectend</a><span>, in §12.5</span>
   <li><a href="#eventdef-xrsession-selectstart">selectstart</a><span>, in §12.5</span>
   <li><a href="#sensitive-information">sensitive information</a><span>, in §13.1</span>
   <li>
    session
    <ul>
     <li><a href="#dom-xrframe-session">attribute for XRFrame</a><span>, in §5.1</span>
     <li><a href="#dom-xrinputsourceschangeevent-session">attribute for XRInputSourcesChangeEvent</a><span>, in §12.3</span>
     <li><a href="#dom-xrsessionevent-session">attribute for XRSessionEvent</a><span>, in §12.1</span>
     <li><a href="#xrspace-session">dfn for XRSpace</a><span>, in §6.1</span>
     <li><a href="#xrwebgllayer-session">dfn for XRWebGLLayer</a><span>, in §11.1</span>
     <li><a href="#dom-xrinputsourceschangeeventinit-session">dict-member for XRInputSourcesChangeEventInit</a><span>, in §12.3</span>
     <li><a href="#dom-xrsessioneventinit-session">dict-member for XRSessionEventInit</a><span>, in §12.1</span>
    </ul>
   <li><a href="#should-not-initialize-device-tracking">SHOULD NOT initialize device tracking</a><span>, in §4.1</span>
   <li><a href="#shut-down-the-session">shut down the session</a><span>, in §4.1</span>
   <li><a href="#eventdef-xrsession-squeeze">squeeze</a><span>, in §12.5</span>
   <li><a href="#eventdef-xrsession-squeezeend">squeezeend</a><span>, in §12.5</span>
   <li><a href="#eventdef-xrsession-squeezestart">squeezestart</a><span>, in §12.5</span>
   <li><a href="#dom-xrwebgllayerinit-stencil">stencil</a><span>, in §11.1</span>
   <li><a href="#xrwebgllayer-target-framebuffer">target framebuffer</a><span>, in §11.1</span>
   <li><a href="#dom-xrinputsource-targetraymode">targetRayMode</a><span>, in §10.1</span>
   <li><a href="#dom-xrinputsource-targetrayspace">targetRaySpace</a><span>, in §10.1</span>
   <li><a href="#throttling">Throttling</a><span>, in §13.4.1</span>
   <li><a href="#xrframe-time">time</a><span>, in §5.1</span>
   <li><a href="#dom-xrtargetraymode-tracked-pointer">"tracked-pointer"</a><span>, in §10.1</span>
   <li><a href="#dom-xrtargetraymode-tracked-pointer">tracked-pointer</a><span>, in §10.1</span>
   <li>
    transform
    <ul>
     <li><a href="#dom-xrpose-transform">attribute for XRPose</a><span>, in §9.1</span>
     <li><a href="#dom-xrreferencespaceevent-transform">attribute for XRReferenceSpaceEvent</a><span>, in §12.4</span>
     <li><a href="#dom-xrview-transform">attribute for XRView</a><span>, in §7.1</span>
     <li><a href="#dom-xrreferencespaceeventinit-transform">dict-member for XRReferenceSpaceEventInit</a><span>, in §12.4</span>
    </ul>
   <li><a href="#transient-action">transient action</a><span>, in §10.2</span>
   <li><a href="#transient-input-sources">transient input sources</a><span>, in §10.2</span>
   <li><a href="#trusted-immersive-ui">trusted immersive UI</a><span>, in §13.6</span>
   <li><a href="#trusted-ui">Trusted UI</a><span>, in §13.6</span>
   <li><a href="#trustworthy">trustworthy</a><span>, in §13.1.2</span>
   <li><a href="#xrreferencespace-type">type</a><span>, in §6.2</span>
   <li><a href="#dom-xrreferencespacetype-unbounded">"unbounded"</a><span>, in §6.2</span>
   <li><a href="#dom-xrreferencespacetype-unbounded">unbounded</a><span>, in §6.2</span>
   <li><a href="#xrview-underlying-view">underlying view</a><span>, in §7.1</span>
   <li><a href="#dom-xrsession-updaterenderstate">updateRenderState()</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-updaterenderstate">updateRenderState(newState)</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-updaterenderstate">updateRenderState(state)</a><span>, in §4.1</span>
   <li><a href="#user-intent">user intent</a><span>, in §13.2</span>
   <li><a href="#view">view</a><span>, in §7.1</span>
   <li><a href="#dom-xrreferencespacetype-viewer">"viewer"</a><span>, in §6.2</span>
   <li>
    viewer
    <ul>
     <li><a href="#viewer">definition of</a><span>, in §9.2</span>
     <li><a href="#dom-xrreferencespacetype-viewer">enum-value for XRReferenceSpaceType</a><span>, in §6.2</span>
    </ul>
   <li><a href="#xrsession-viewer-reference-space">viewer reference space</a><span>, in §4.1</span>
   <li><a href="#view-offset">view offset</a><span>, in §7.1</span>
   <li><a href="#dom-xrviewerpose-views">views</a><span>, in §9.2</span>
   <li><a href="#eventdef-xrsession-visibilitychange">visibilitychange</a><span>, in §12.5</span>
   <li><a href="#xrsession-visibility-state">visibility state</a><span>, in §4.1</span>
   <li><a href="#dom-xrsession-visibilitystate">visibilityState</a><span>, in §4.1</span>
   <li><a href="#dom-xrvisibilitystate-visible">visible</a><span>, in §4.1</span>
   <li><a href="#dom-xrvisibilitystate-visible">"visible"</a><span>, in §4.1</span>
   <li><a href="#dom-xrvisibilitystate-visible-blurred">"visible-blurred"</a><span>, in §4.1</span>
   <li><a href="#dom-xrvisibilitystate-visible-blurred">visible-blurred</a><span>, in §4.1</span>
   <li><a href="#dom-xrviewport-width">width</a><span>, in §7.2</span>
   <li><a href="#dom-xrviewport-x">x</a><span>, in §7.2</span>
   <li><a href="#dom-navigator-xr">xr</a><span>, in §3.1</span>
   <li><a href="#xr">XR</a><span>, in §3.2</span>
   <li><a href="#xr-animation-frame">XR animation frame</a><span>, in §4.3</span>
   <li><a href="#xrboundedreferencespace">XRBoundedReferenceSpace</a><span>, in §6.3</span>
   <li><a href="#dom-webglcontextattributes-xrcompatible">xrCompatible</a><span>, in §11.2</span>
   <li><a href="#xr-compatible">XR compatible</a><span>, in §11.2</span>
   <li><a href="#xr-compositor">XR Compositor</a><span>, in §4.4</span>
   <li>
    XR device
    <ul>
     <li><a href="#xr-device">dfn for </a><span>, in §2.1</span>
     <li><a href="#xrsession-xr-device">dfn for XRSession</a><span>, in §4.1</span>
    </ul>
   <li><a href="#enumdef-xreye">XREye</a><span>, in §7.1</span>
   <li><a href="#xrframe">XRFrame</a><span>, in §5.1</span>
   <li><a href="#callbackdef-xrframerequestcallback">XRFrameRequestCallback</a><span>, in §4.3</span>
   <li><a href="#enumdef-xrhandedness">XRHandedness</a><span>, in §10.1</span>
   <li><a href="#xrinputsource">XRInputSource</a><span>, in §10.1</span>
   <li><a href="#xr-input-source">XR input source</a><span>, in §10.1</span>
   <li><a href="#xrinputsourcearray">XRInputSourceArray</a><span>, in §10.3</span>
   <li><a href="#xrinputsourceevent">XRInputSourceEvent</a><span>, in §12.2</span>
   <li><a href="#dictdef-xrinputsourceeventinit">XRInputSourceEventInit</a><span>, in §12.2</span>
   <li><a href="#dom-xrinputsourceevent-xrinputsourceevent">XRInputSourceEvent(type, eventInitDict)</a><span>, in §12.2</span>
   <li><a href="#xrinputsourceschangeevent">XRInputSourcesChangeEvent</a><span>, in §12.3</span>
   <li><a href="#dictdef-xrinputsourceschangeeventinit">XRInputSourcesChangeEventInit</a><span>, in §12.3</span>
   <li><a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent">XRInputSourcesChangeEvent(type, eventInitDict)</a><span>, in §12.3</span>
   <li><a href="#xrpose">XRPose</a><span>, in §9.1</span>
   <li><a href="#xrreferencespace">XRReferenceSpace</a><span>, in §6.2</span>
   <li><a href="#xrreferencespaceevent">XRReferenceSpaceEvent</a><span>, in §12.4</span>
   <li><a href="#dictdef-xrreferencespaceeventinit">XRReferenceSpaceEventInit</a><span>, in §12.4</span>
   <li><a href="#dom-xrreferencespaceevent-xrreferencespaceevent">XRReferenceSpaceEvent(type, eventInitDict)</a><span>, in §12.4</span>
   <li><a href="#enumdef-xrreferencespacetype">XRReferenceSpaceType</a><span>, in §6.2</span>
   <li><a href="#xrrenderstate">XRRenderState</a><span>, in §4.2</span>
   <li><a href="#dictdef-xrrenderstateinit">XRRenderStateInit</a><span>, in §4.2</span>
   <li><a href="#xrrigidtransform">XRRigidTransform</a><span>, in §8.3</span>
   <li><a href="#dom-xrrigidtransform-xrrigidtransform">XRRigidTransform()</a><span>, in §8.3</span>
   <li><a href="#dom-xrrigidtransform-xrrigidtransform">XRRigidTransform(position)</a><span>, in §8.3</span>
   <li><a href="#dom-xrrigidtransform-xrrigidtransform">XRRigidTransform(position, orientation)</a><span>, in §8.3</span>
   <li><a href="#xrsession">XRSession</a><span>, in §4.1</span>
   <li><a href="#xrsessionevent">XRSessionEvent</a><span>, in §12.1</span>
   <li><a href="#dictdef-xrsessioneventinit">XRSessionEventInit</a><span>, in §12.1</span>
   <li><a href="#dom-xrsessionevent-xrsessionevent">XRSessionEvent(type, eventInitDict)</a><span>, in §12.1</span>
   <li><a href="#dictdef-xrsessioninit">XRSessionInit</a><span>, in §3.4</span>
   <li><a href="#enumdef-xrsessionmode">XRSessionMode</a><span>, in §3.3</span>
   <li><a href="#xrspace">XRSpace</a><span>, in §6.1</span>
   <li><a href="#enumdef-xrtargetraymode">XRTargetRayMode</a><span>, in §10.1</span>
   <li><a href="#xrview">XRView</a><span>, in §7.1</span>
   <li><a href="#xrviewerpose">XRViewerPose</a><span>, in §9.2</span>
   <li><a href="#xrviewport">XRViewport</a><span>, in §7.2</span>
   <li><a href="#enumdef-xrvisibilitystate">XRVisibilityState</a><span>, in §4.1</span>
   <li><a href="#xrwebgllayer">XRWebGLLayer</a><span>, in §11.1</span>
   <li><a href="#dictdef-xrwebgllayerinit">XRWebGLLayerInit</a><span>, in §11.1</span>
   <li><a href="#dom-xrwebgllayer-xrwebgllayer">XRWebGLLayer(session, context)</a><span>, in §11.1</span>
   <li><a href="#dom-xrwebgllayer-xrwebgllayer">XRWebGLLayer(session, context, layerInit)</a><span>, in §11.1</span>
   <li><a href="#typedefdef-xrwebglrenderingcontext">XRWebGLRenderingContext</a><span>, in §11.1</span>
   <li><a href="#dom-xrviewport-y">y</a><span>, in §7.2</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-document">
   <a href="https://dom.spec.whatwg.org/#document">https://dom.spec.whatwg.org/#document</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-document">13.1.1. Active and focused document</a>
    <li><a href="#ref-for-document①">13.1.2. Trustworthy documents and origins</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-event">
   <a href="https://dom.spec.whatwg.org/#event">https://dom.spec.whatwg.org/#event</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-event">12.1. XRSessionEvent</a>
    <li><a href="#ref-for-event①">12.2. XRInputSourceEvent</a>
    <li><a href="#ref-for-event②">12.3. XRInputSourcesChangeEvent</a>
    <li><a href="#ref-for-event③">12.4. XRReferenceSpaceEvent</a>
    <li><a href="#ref-for-event④">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dictdef-eventinit">
   <a href="https://dom.spec.whatwg.org/#dictdef-eventinit">https://dom.spec.whatwg.org/#dictdef-eventinit</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-eventinit">12.1. XRSessionEvent</a>
    <li><a href="#ref-for-dictdef-eventinit①">12.2. XRInputSourceEvent</a>
    <li><a href="#ref-for-dictdef-eventinit②">12.3. XRInputSourcesChangeEvent</a>
    <li><a href="#ref-for-dictdef-eventinit③">12.4. XRReferenceSpaceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-eventtarget">
   <a href="https://dom.spec.whatwg.org/#eventtarget">https://dom.spec.whatwg.org/#eventtarget</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventtarget">3.2. XR</a>
    <li><a href="#ref-for-eventtarget①">4.1. XRSession</a>
    <li><a href="#ref-for-eventtarget②">6.1. XRSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-canceled-flag">
   <a href="https://dom.spec.whatwg.org/#canceled-flag">https://dom.spec.whatwg.org/#canceled-flag</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-canceled-flag">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-context-object">
   <a href="https://dom.spec.whatwg.org/#context-object">https://dom.spec.whatwg.org/#context-object</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-context-object">3.1. navigator.xr</a>
    <li><a href="#ref-for-context-object①">3.2. XR</a> <a href="#ref-for-context-object②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-concept-event-dispatch">
   <a href="https://dom.spec.whatwg.org/#concept-event-dispatch">https://dom.spec.whatwg.org/#concept-event-dispatch</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-concept-event-dispatch">12.2. XRInputSourceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-concept-event-fire">
   <a href="https://dom.spec.whatwg.org/#concept-event-fire">https://dom.spec.whatwg.org/#concept-event-fire</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-concept-event-fire">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-event-type">
   <a href="https://dom.spec.whatwg.org/#dom-event-type">https://dom.spec.whatwg.org/#dom-event-type</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-event-type">12.2. XRInputSourceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-sec-isdetachedbuffer">
   <a href="https://tc39.github.io/ecma262/#sec-isdetachedbuffer">https://tc39.github.io/ecma262/#sec-isdetachedbuffer</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-sec-isdetachedbuffer">7.1. XRView</a>
    <li><a href="#ref-for-sec-isdetachedbuffer①">8.3. XRRigidTransform</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-default-allowlist">
   <a href="https://wicg.github.io/feature-policy/#default-allowlist">https://wicg.github.io/feature-policy/#default-allowlist</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-default-allowlist">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-policy-controlled-feature">
   <a href="https://wicg.github.io/feature-policy/#policy-controlled-feature">https://wicg.github.io/feature-policy/#policy-controlled-feature</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-policy-controlled-feature">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dommatrix">
   <a href="https://drafts.fxtf.org/geometry-1/#dommatrix">https://drafts.fxtf.org/geometry-1/#dommatrix</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dommatrix">8.1. Matrices</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dictdef-dompointinit">
   <a href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit">https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-dompointinit">8.3. XRRigidTransform</a> <a href="#ref-for-dictdef-dompointinit①">(2)</a> <a href="#ref-for-dictdef-dompointinit②">(3)</a> <a href="#ref-for-dictdef-dompointinit③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dompointreadonly">
   <a href="https://drafts.fxtf.org/geometry-1/#dompointreadonly">https://drafts.fxtf.org/geometry-1/#dompointreadonly</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dompointreadonly">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-dompointreadonly①">(2)</a> <a href="#ref-for-dompointreadonly②">(3)</a>
    <li><a href="#ref-for-dompointreadonly③">8.1. Matrices</a>
    <li><a href="#ref-for-dompointreadonly④">8.3. XRRigidTransform</a> <a href="#ref-for-dompointreadonly⑤">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-dompointreadonly-w">
   <a href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-w">https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-w</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-dompointreadonly-w">6.3. XRBoundedReferenceSpace</a>
    <li><a href="#ref-for-dom-dompointreadonly-w①">8.3. XRRigidTransform</a> <a href="#ref-for-dom-dompointreadonly-w②">(2)</a> <a href="#ref-for-dom-dompointreadonly-w③">(3)</a> <a href="#ref-for-dom-dompointreadonly-w④">(4)</a> <a href="#ref-for-dom-dompointreadonly-w⑤">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-dompointreadonly-x">
   <a href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-x">https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-x</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-dompointreadonly-x">8.3. XRRigidTransform</a> <a href="#ref-for-dom-dompointreadonly-x①">(2)</a> <a href="#ref-for-dom-dompointreadonly-x②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-dompointreadonly-y">
   <a href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-y">https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-y</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-dompointreadonly-y">6.3. XRBoundedReferenceSpace</a>
    <li><a href="#ref-for-dom-dompointreadonly-y①">8.3. XRRigidTransform</a> <a href="#ref-for-dom-dompointreadonly-y②">(2)</a> <a href="#ref-for-dom-dompointreadonly-y③">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-dompointreadonly-z">
   <a href="https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-z">https://drafts.fxtf.org/geometry-1/#dom-dompointreadonly-z</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-dompointreadonly-z">8.3. XRRigidTransform</a> <a href="#ref-for-dom-dompointreadonly-z①">(2)</a> <a href="#ref-for-dom-dompointreadonly-z②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-domhighrestimestamp">
   <a href="https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp">https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-domhighrestimestamp">4.3. Animation Frames</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-eventhandler">
   <a href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler">https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventhandler">3.2. XR</a>
    <li><a href="#ref-for-eventhandler①">4.1. XRSession</a> <a href="#ref-for-eventhandler②">(2)</a> <a href="#ref-for-eventhandler③">(3)</a> <a href="#ref-for-eventhandler④">(4)</a> <a href="#ref-for-eventhandler⑤">(5)</a> <a href="#ref-for-eventhandler⑥">(6)</a> <a href="#ref-for-eventhandler⑦">(7)</a> <a href="#ref-for-eventhandler⑧">(8)</a> <a href="#ref-for-eventhandler⑨">(9)</a>
    <li><a href="#ref-for-eventhandler①⓪">6.2. XRReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-htmlcanvaselement">
   <a href="https://html.spec.whatwg.org/multipage/canvas.html#htmlcanvaselement">https://html.spec.whatwg.org/multipage/canvas.html#htmlcanvaselement</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-htmlcanvaselement">4.2. XRRenderState</a>
    <li><a href="#ref-for-htmlcanvaselement①">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-navigator">
   <a href="https://html.spec.whatwg.org/multipage/system-state.html#navigator">https://html.spec.whatwg.org/multipage/system-state.html#navigator</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-navigator">3.1. navigator.xr</a>
    <li><a href="#ref-for-navigator①">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-window">
   <a href="https://html.spec.whatwg.org/multipage/window-object.html#window">https://html.spec.whatwg.org/multipage/window-object.html#window</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-window">4.3. Animation Frames</a> <a href="#ref-for-window①">(2)</a> <a href="#ref-for-window②">(3)</a> <a href="#ref-for-window③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-active-document">
   <a href="https://html.spec.whatwg.org/multipage/browsers.html#active-document">https://html.spec.whatwg.org/multipage/browsers.html#active-document</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-active-document">13.1.1. Active and focused document</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-browsing-context">
   <a href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context">https://html.spec.whatwg.org/multipage/browsers.html#browsing-context</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-browsing-context">4.3. Animation Frames</a>
    <li><a href="#ref-for-browsing-context①">13.2.4. Duration of consent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-currently-focused-area-of-a-top-level-browsing-context">
   <a href="https://html.spec.whatwg.org/multipage/interaction.html#currently-focused-area-of-a-top-level-browsing-context">https://html.spec.whatwg.org/multipage/interaction.html#currently-focused-area-of-a-top-level-browsing-context</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-currently-focused-area-of-a-top-level-browsing-context">13.1.1. Active and focused document</a>
    <li><a href="#ref-for-currently-focused-area-of-a-top-level-browsing-context①">13.6. Trusted Environment</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-event-handler-idl-attributes">
   <a href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes">https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-event-handler-idl-attributes">3.2. XR</a>
    <li><a href="#ref-for-event-handler-idl-attributes①">4.1. XRSession</a> <a href="#ref-for-event-handler-idl-attributes②">(2)</a> <a href="#ref-for-event-handler-idl-attributes③">(3)</a> <a href="#ref-for-event-handler-idl-attributes④">(4)</a> <a href="#ref-for-event-handler-idl-attributes⑤">(5)</a> <a href="#ref-for-event-handler-idl-attributes⑥">(6)</a> <a href="#ref-for-event-handler-idl-attributes⑦">(7)</a> <a href="#ref-for-event-handler-idl-attributes⑧">(8)</a> <a href="#ref-for-event-handler-idl-attributes⑨">(9)</a>
    <li><a href="#ref-for-event-handler-idl-attributes①⓪">6.2. XRReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-canvas-getcontext">
   <a href="https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-getcontext">https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-getcontext</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-canvas-getcontext">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-in-parallel">
   <a href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-in-parallel">3.2. XR</a> <a href="#ref-for-in-parallel①">(2)</a>
    <li><a href="#ref-for-in-parallel②">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-concept-origin">
   <a href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin">https://html.spec.whatwg.org/multipage/origin.html#concept-origin</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-concept-origin">13.2.4. Duration of consent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-queue-a-task">
   <a href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-queue-a-task">3.2. XR</a> <a href="#ref-for-queue-a-task①">(2)</a>
    <li><a href="#ref-for-queue-a-task②">4.1. XRSession</a> <a href="#ref-for-queue-a-task③">(2)</a> <a href="#ref-for-queue-a-task④">(3)</a> <a href="#ref-for-queue-a-task⑤">(4)</a> <a href="#ref-for-queue-a-task⑥">(5)</a>
    <li><a href="#ref-for-queue-a-task⑦">10.1. XRInputSource</a> <a href="#ref-for-queue-a-task⑧">(2)</a> <a href="#ref-for-queue-a-task⑨">(3)</a> <a href="#ref-for-queue-a-task①⓪">(4)</a> <a href="#ref-for-queue-a-task①①">(5)</a> <a href="#ref-for-queue-a-task①②">(6)</a>
    <li><a href="#ref-for-queue-a-task①③">10.2. Transient input</a> <a href="#ref-for-queue-a-task①④">(2)</a> <a href="#ref-for-queue-a-task①⑤">(3)</a>
    <li><a href="#ref-for-queue-a-task①⑥">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-rendering-opportunity">
   <a href="https://html.spec.whatwg.org/multipage/webappapis.html#rendering-opportunity">https://html.spec.whatwg.org/multipage/webappapis.html#rendering-opportunity</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-rendering-opportunity">4.3. Animation Frames</a> <a href="#ref-for-rendering-opportunity①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-report-the-exception">
   <a href="https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception">https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-report-the-exception">4.3. Animation Frames</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-animationframeprovider-requestanimationframe">
   <a href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe">https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-animationframeprovider-requestanimationframe">4.3. Animation Frames</a> <a href="#ref-for-dom-animationframeprovider-requestanimationframe①">(2)</a> <a href="#ref-for-dom-animationframeprovider-requestanimationframe②">(3)</a> <a href="#ref-for-dom-animationframeprovider-requestanimationframe③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-responsible-document">
   <a href="https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document">https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-responsible-document">13.1.2. Trustworthy documents and origins</a>
    <li><a href="#ref-for-responsible-document①">13.5.1. Immersiveness</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-same-origin-domain">
   <a href="https://html.spec.whatwg.org/multipage/origin.html#same-origin-domain">https://html.spec.whatwg.org/multipage/origin.html#same-origin-domain</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-same-origin-domain">13.1.1. Active and focused document</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-triggered-by-user-activation">
   <a href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation">https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-triggered-by-user-activation">1.2. Application flow</a>
    <li><a href="#ref-for-triggered-by-user-activation①">13.2.1. User activation</a>
    <li><a href="#ref-for-triggered-by-user-activation②">13.5.1. Immersiveness</a> <a href="#ref-for-triggered-by-user-activation③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list-append">
   <a href="https://infra.spec.whatwg.org/#list-append">https://infra.spec.whatwg.org/#list-append</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-append">5.1. XRFrame</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list-contain">
   <a href="https://infra.spec.whatwg.org/#list-contain">https://infra.spec.whatwg.org/#list-contain</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-contain">2.1. XR device</a> <a href="#ref-for-list-contain①">(2)</a>
    <li><a href="#ref-for-list-contain②">3.2. XR</a> <a href="#ref-for-list-contain③">(2)</a> <a href="#ref-for-list-contain④">(3)</a>
    <li><a href="#ref-for-list-contain⑤">6.2. XRReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list-extend">
   <a href="https://infra.spec.whatwg.org/#list-extend">https://infra.spec.whatwg.org/#list-extend</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-extend">4.1. XRSession</a> <a href="#ref-for-list-extend①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list">
   <a href="https://infra.spec.whatwg.org/#list">https://infra.spec.whatwg.org/#list</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list">2.1. XR device</a>
    <li><a href="#ref-for-list①">3.2. XR</a> <a href="#ref-for-list②">(2)</a> <a href="#ref-for-list③">(3)</a>
    <li><a href="#ref-for-list④">3.4. Feature Dependencies</a> <a href="#ref-for-list⑤">(2)</a>
    <li><a href="#ref-for-list⑥">4.1. XRSession</a> <a href="#ref-for-list⑦">(2)</a> <a href="#ref-for-list⑧">(3)</a> <a href="#ref-for-list⑨">(4)</a> <a href="#ref-for-list①⓪">(5)</a> <a href="#ref-for-list①①">(6)</a> <a href="#ref-for-list①②">(7)</a> <a href="#ref-for-list①③">(8)</a> <a href="#ref-for-list①④">(9)</a>
    <li><a href="#ref-for-list①⑤">5.1. XRFrame</a> <a href="#ref-for-list①⑥">(2)</a> <a href="#ref-for-list①⑦">(3)</a>
    <li><a href="#ref-for-list①⑧">10.1. XRInputSource</a>
    <li><a href="#ref-for-list①⑨">10.3. XRInputSourceArray</a> <a href="#ref-for-list②⓪">(2)</a>
    <li><a href="#ref-for-list②①">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-list②②">12.3. XRInputSourcesChangeEvent</a> <a href="#ref-for-list②③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list-remove">
   <a href="https://infra.spec.whatwg.org/#list-remove">https://infra.spec.whatwg.org/#list-remove</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-remove">4.1. XRSession</a> <a href="#ref-for-list-remove①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list-size">
   <a href="https://infra.spec.whatwg.org/#list-size">https://infra.spec.whatwg.org/#list-size</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-size">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-string">
   <a href="https://infra.spec.whatwg.org/#string">https://infra.spec.whatwg.org/#string</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-string">2.1. XR device</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-absoluteorientationsensor">
   <a href="https://w3c.github.io/orientation-sensor/#absoluteorientationsensor">https://w3c.github.io/orientation-sensor/#absoluteorientationsensor</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-absoluteorientationsensor">1. Introduction</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-relativeorientationsensor">
   <a href="https://w3c.github.io/orientation-sensor/#relativeorientationsensor">https://w3c.github.io/orientation-sensor/#relativeorientationsensor</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-relativeorientationsensor">1. Introduction</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-a-new-promise">
   <a href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise">https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-a-new-promise">3.2. XR</a> <a href="#ref-for-a-new-promise①">(2)</a>
    <li><a href="#ref-for-a-new-promise②">4.1. XRSession</a> <a href="#ref-for-a-new-promise③">(2)</a>
    <li><a href="#ref-for-a-new-promise④">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-reject-promise">
   <a href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise">https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-reject-promise">3.2. XR</a> <a href="#ref-for-reject-promise①">(2)</a> <a href="#ref-for-reject-promise②">(3)</a> <a href="#ref-for-reject-promise③">(4)</a> <a href="#ref-for-reject-promise④">(5)</a> <a href="#ref-for-reject-promise⑤">(6)</a>
    <li><a href="#ref-for-reject-promise⑥">4.1. XRSession</a> <a href="#ref-for-reject-promise⑦">(2)</a>
    <li><a href="#ref-for-reject-promise⑧">11.2. WebGL Context Compatibility</a> <a href="#ref-for-reject-promise⑨">(2)</a> <a href="#ref-for-reject-promise①⓪">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-resolve-promise">
   <a href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise">https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-resolve-promise">3.2. XR</a> <a href="#ref-for-resolve-promise①">(2)</a> <a href="#ref-for-resolve-promise②">(3)</a> <a href="#ref-for-resolve-promise③">(4)</a> <a href="#ref-for-resolve-promise④">(5)</a>
    <li><a href="#ref-for-resolve-promise⑤">4.1. XRSession</a> <a href="#ref-for-resolve-promise⑥">(2)</a>
    <li><a href="#ref-for-resolve-promise⑦">11.2. WebGL Context Compatibility</a> <a href="#ref-for-resolve-promise⑧">(2)</a> <a href="#ref-for-resolve-promise⑨">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-WebGL2RenderingContext">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext">https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-WebGL2RenderingContext">11.1. XRWebGLLayer</a> <a href="#ref-for-WebGL2RenderingContext①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-WebGLRenderingContextBase">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase">https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-WebGLRenderingContextBase">3.2. XR</a>
    <li><a href="#ref-for-WebGLRenderingContextBase①">11.1. XRWebGLLayer</a> <a href="#ref-for-WebGLRenderingContextBase②">(2)</a> <a href="#ref-for-WebGLRenderingContextBase③">(3)</a>
    <li><a href="#ref-for-WebGLRenderingContextBase④">11.2. WebGL Context Compatibility</a> <a href="#ref-for-WebGLRenderingContextBase⑤">(2)</a> <a href="#ref-for-WebGLRenderingContextBase⑥">(3)</a> <a href="#ref-for-WebGLRenderingContextBase⑦">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-WebGLRenderingContextBase">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase">https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-WebGLRenderingContextBase">3.2. XR</a>
    <li><a href="#ref-for-WebGLRenderingContextBase①">11.1. XRWebGLLayer</a> <a href="#ref-for-WebGLRenderingContextBase②">(2)</a> <a href="#ref-for-WebGLRenderingContextBase③">(3)</a>
    <li><a href="#ref-for-WebGLRenderingContextBase④">11.2. WebGL Context Compatibility</a> <a href="#ref-for-WebGLRenderingContextBase⑤">(2)</a> <a href="#ref-for-WebGLRenderingContextBase⑥">(3)</a> <a href="#ref-for-WebGLRenderingContextBase⑦">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-WebGLRenderingContextBase">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase">https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-WebGLRenderingContextBase">3.2. XR</a>
    <li><a href="#ref-for-WebGLRenderingContextBase①">11.1. XRWebGLLayer</a> <a href="#ref-for-WebGLRenderingContextBase②">(2)</a> <a href="#ref-for-WebGLRenderingContextBase③">(3)</a>
    <li><a href="#ref-for-WebGLRenderingContextBase④">11.2. WebGL Context Compatibility</a> <a href="#ref-for-WebGLRenderingContextBase⑤">(2)</a> <a href="#ref-for-WebGLRenderingContextBase⑥">(3)</a> <a href="#ref-for-WebGLRenderingContextBase⑦">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-WebGLContextAttributes">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes">https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-WebGLContextAttributes">11.1. XRWebGLLayer</a> <a href="#ref-for-WebGLContextAttributes①">(2)</a>
    <li><a href="#ref-for-WebGLContextAttributes②">11.2. WebGL Context Compatibility</a> <a href="#ref-for-WebGLContextAttributes③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-WebGLFramebuffer">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer">https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-WebGLFramebuffer">11.1. XRWebGLLayer</a> <a href="#ref-for-WebGLFramebuffer①">(2)</a> <a href="#ref-for-WebGLFramebuffer②">(3)</a> <a href="#ref-for-WebGLFramebuffer③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-WebGLRenderingContext">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext">https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-WebGLRenderingContext">4.1. XRSession</a>
    <li><a href="#ref-for-WebGLRenderingContext①">11.1. XRWebGLLayer</a> <a href="#ref-for-WebGLRenderingContext②">(2)</a> <a href="#ref-for-WebGLRenderingContext③">(3)</a> <a href="#ref-for-WebGLRenderingContext④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-WebGLRenderingContextBase">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase">https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-WebGLRenderingContextBase">3.2. XR</a>
    <li><a href="#ref-for-WebGLRenderingContextBase①">11.1. XRWebGLLayer</a> <a href="#ref-for-WebGLRenderingContextBase②">(2)</a> <a href="#ref-for-WebGLRenderingContextBase③">(3)</a>
    <li><a href="#ref-for-WebGLRenderingContextBase④">11.2. WebGL Context Compatibility</a> <a href="#ref-for-WebGLRenderingContextBase⑤">(2)</a> <a href="#ref-for-WebGLRenderingContextBase⑥">(3)</a> <a href="#ref-for-WebGLRenderingContextBase⑦">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-actual-context-parameters">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters">https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-actual-context-parameters">11.1. XRWebGLLayer</a> <a href="#ref-for-actual-context-parameters①">(2)</a> <a href="#ref-for-actual-context-parameters②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-5.14.6">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6">https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-5.14.6">11.1. XRWebGLLayer</a> <a href="#ref-for-5.14.6①">(2)</a> <a href="#ref-for-5.14.6②">(3)</a> <a href="#ref-for-5.14.6③">(4)</a> <a href="#ref-for-5.14.6④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-create-a-drawing-buffer">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#create-a-drawing-buffer">https://www.khronos.org/registry/webgl/specs/latest/1.0/#create-a-drawing-buffer</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-create-a-drawing-buffer">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-2.1">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.1">https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.1</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-2.1">11.2. WebGL Context Compatibility</a> <a href="#ref-for-2.1①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-2.2">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2">https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-2.2">11.1. XRWebGLLayer</a> <a href="#ref-for-2.2①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-5.14.6">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6">https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-5.14.6">11.1. XRWebGLLayer</a> <a href="#ref-for-5.14.6①">(2)</a> <a href="#ref-for-5.14.6②">(3)</a> <a href="#ref-for-5.14.6③">(4)</a> <a href="#ref-for-5.14.6④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-5.14.6">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6">https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-5.14.6">11.1. XRWebGLLayer</a> <a href="#ref-for-5.14.6①">(2)</a> <a href="#ref-for-5.14.6②">(3)</a> <a href="#ref-for-5.14.6③">(4)</a> <a href="#ref-for-5.14.6④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-5.14.6">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6">https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-5.14.6">11.1. XRWebGLLayer</a> <a href="#ref-for-5.14.6①">(2)</a> <a href="#ref-for-5.14.6②">(3)</a> <a href="#ref-for-5.14.6③">(4)</a> <a href="#ref-for-5.14.6④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-5.14.6">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6">https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-5.14.6">11.1. XRWebGLLayer</a> <a href="#ref-for-5.14.6①">(2)</a> <a href="#ref-for-5.14.6②">(3)</a> <a href="#ref-for-5.14.6③">(4)</a> <a href="#ref-for-5.14.6④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-CONTEXT_LOST">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#CONTEXT_LOST">https://www.khronos.org/registry/webgl/specs/latest/1.0/#CONTEXT_LOST</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-CONTEXT_LOST">11.2. WebGL Context Compatibility</a> <a href="#ref-for-CONTEXT_LOST①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-restore-the-drawing-buffer">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#restore-the-drawing-buffer">https://www.khronos.org/registry/webgl/specs/latest/1.0/#restore-the-drawing-buffer</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-restore-the-drawing-buffer">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-5.14.10">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10">https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-5.14.10">8.1. Matrices</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-webgl-context-lost-flag">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-context-lost-flag">https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-context-lost-flag</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-webgl-context-lost-flag">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-5.15">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15">https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-5.15">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-5.14.4">
   <a href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4">https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-5.14.4">7.2. XRViewport</a> <a href="#ref-for-5.14.4①">(2)</a>
    <li><a href="#ref-for-5.14.4②">11.1. XRWebGLLayer</a> <a href="#ref-for-5.14.4③">(2)</a> <a href="#ref-for-5.14.4④">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-aborterror">
   <a href="https://heycam.github.io/webidl/#aborterror">https://heycam.github.io/webidl/#aborterror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-aborterror">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-DOMException">
   <a href="https://heycam.github.io/webidl/#idl-DOMException">https://heycam.github.io/webidl/#idl-DOMException</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-DOMException">3.2. XR</a> <a href="#ref-for-idl-DOMException①">(2)</a> <a href="#ref-for-idl-DOMException②">(3)</a> <a href="#ref-for-idl-DOMException③">(4)</a> <a href="#ref-for-idl-DOMException④">(5)</a> <a href="#ref-for-idl-DOMException⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-DOMString">
   <a href="https://heycam.github.io/webidl/#idl-DOMString">https://heycam.github.io/webidl/#idl-DOMString</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-DOMString">3.4. Feature Dependencies</a> <a href="#ref-for-idl-DOMString①">(2)</a>
    <li><a href="#ref-for-idl-DOMString②">10.1. XRInputSource</a> <a href="#ref-for-idl-DOMString③">(2)</a>
    <li><a href="#ref-for-idl-DOMString④">12.1. XRSessionEvent</a>
    <li><a href="#ref-for-idl-DOMString⑤">12.2. XRInputSourceEvent</a>
    <li><a href="#ref-for-idl-DOMString⑥">12.3. XRInputSourcesChangeEvent</a>
    <li><a href="#ref-for-idl-DOMString⑦">12.4. XRReferenceSpaceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-Exposed">
   <a href="https://heycam.github.io/webidl/#Exposed">https://heycam.github.io/webidl/#Exposed</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-Exposed">3.2. XR</a>
    <li><a href="#ref-for-Exposed①">4.1. XRSession</a>
    <li><a href="#ref-for-Exposed②">4.2. XRRenderState</a>
    <li><a href="#ref-for-Exposed③">5.1. XRFrame</a>
    <li><a href="#ref-for-Exposed④">6.1. XRSpace</a>
    <li><a href="#ref-for-Exposed⑤">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-Exposed⑥">6.3. XRBoundedReferenceSpace</a>
    <li><a href="#ref-for-Exposed⑦">7.1. XRView</a>
    <li><a href="#ref-for-Exposed⑧">7.2. XRViewport</a>
    <li><a href="#ref-for-Exposed⑨">8.3. XRRigidTransform</a>
    <li><a href="#ref-for-Exposed①⓪">9.1. XRPose</a>
    <li><a href="#ref-for-Exposed①①">9.2. XRViewerPose</a>
    <li><a href="#ref-for-Exposed①②">10.1. XRInputSource</a>
    <li><a href="#ref-for-Exposed①③">10.3. XRInputSourceArray</a>
    <li><a href="#ref-for-Exposed①④">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-Exposed①⑤">12.1. XRSessionEvent</a>
    <li><a href="#ref-for-Exposed①⑥">12.2. XRInputSourceEvent</a>
    <li><a href="#ref-for-Exposed①⑦">12.3. XRInputSourcesChangeEvent</a>
    <li><a href="#ref-for-Exposed①⑧">12.4. XRReferenceSpaceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-Float32Array">
   <a href="https://heycam.github.io/webidl/#idl-Float32Array">https://heycam.github.io/webidl/#idl-Float32Array</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-Float32Array">7.1. XRView</a>
    <li><a href="#ref-for-idl-Float32Array①">8.1. Matrices</a> <a href="#ref-for-idl-Float32Array②">(2)</a>
    <li><a href="#ref-for-idl-Float32Array③">8.3. XRRigidTransform</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-invalidstateerror">
   <a href="https://heycam.github.io/webidl/#invalidstateerror">https://heycam.github.io/webidl/#invalidstateerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-invalidstateerror">3.2. XR</a>
    <li><a href="#ref-for-invalidstateerror①">4.1. XRSession</a> <a href="#ref-for-invalidstateerror②">(2)</a> <a href="#ref-for-invalidstateerror③">(3)</a> <a href="#ref-for-invalidstateerror④">(4)</a>
    <li><a href="#ref-for-invalidstateerror⑤">5.1. XRFrame</a>
    <li><a href="#ref-for-invalidstateerror⑥">6.1. XRSpace</a> <a href="#ref-for-invalidstateerror⑦">(2)</a> <a href="#ref-for-invalidstateerror⑧">(3)</a>
    <li><a href="#ref-for-invalidstateerror⑨">8.2. Normalization</a>
    <li><a href="#ref-for-invalidstateerror①⓪">11.1. XRWebGLLayer</a> <a href="#ref-for-invalidstateerror①①">(2)</a> <a href="#ref-for-invalidstateerror①②">(3)</a> <a href="#ref-for-invalidstateerror①③">(4)</a> <a href="#ref-for-invalidstateerror①④">(5)</a>
    <li><a href="#ref-for-invalidstateerror①⑤">11.2. WebGL Context Compatibility</a> <a href="#ref-for-invalidstateerror①⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-NewObject">
   <a href="https://heycam.github.io/webidl/#NewObject">https://heycam.github.io/webidl/#NewObject</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-NewObject">3.2. XR</a>
    <li><a href="#ref-for-NewObject①">4.1. XRSession</a>
    <li><a href="#ref-for-NewObject②">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-NewObject③">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-notsupportederror">
   <a href="https://heycam.github.io/webidl/#notsupportederror">https://heycam.github.io/webidl/#notsupportederror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-notsupportederror">3.2. XR</a> <a href="#ref-for-notsupportederror①">(2)</a>
    <li><a href="#ref-for-notsupportederror②">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-operationerror">
   <a href="https://heycam.github.io/webidl/#operationerror">https://heycam.github.io/webidl/#operationerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-operationerror">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-SameObject">
   <a href="https://heycam.github.io/webidl/#SameObject">https://heycam.github.io/webidl/#SameObject</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-SameObject">3.1. navigator.xr</a>
    <li><a href="#ref-for-SameObject①">4.1. XRSession</a> <a href="#ref-for-SameObject②">(2)</a>
    <li><a href="#ref-for-SameObject③">5.1. XRFrame</a>
    <li><a href="#ref-for-SameObject④">7.1. XRView</a>
    <li><a href="#ref-for-SameObject⑤">8.3. XRRigidTransform</a> <a href="#ref-for-SameObject⑥">(2)</a> <a href="#ref-for-SameObject⑦">(3)</a>
    <li><a href="#ref-for-SameObject⑧">9.1. XRPose</a>
    <li><a href="#ref-for-SameObject⑨">9.2. XRViewerPose</a>
    <li><a href="#ref-for-SameObject①⓪">10.1. XRInputSource</a> <a href="#ref-for-SameObject①①">(2)</a> <a href="#ref-for-SameObject①②">(3)</a>
    <li><a href="#ref-for-SameObject①③">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-SameObject①④">12.1. XRSessionEvent</a>
    <li><a href="#ref-for-SameObject①⑤">12.2. XRInputSourceEvent</a> <a href="#ref-for-SameObject①⑥">(2)</a>
    <li><a href="#ref-for-SameObject①⑦">12.3. XRInputSourcesChangeEvent</a> <a href="#ref-for-SameObject①⑧">(2)</a> <a href="#ref-for-SameObject①⑨">(3)</a>
    <li><a href="#ref-for-SameObject②⓪">12.4. XRReferenceSpaceEvent</a> <a href="#ref-for-SameObject②①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-SecureContext">
   <a href="https://heycam.github.io/webidl/#SecureContext">https://heycam.github.io/webidl/#SecureContext</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-SecureContext">3.1. navigator.xr</a>
    <li><a href="#ref-for-SecureContext①">3.2. XR</a>
    <li><a href="#ref-for-SecureContext②">4.1. XRSession</a>
    <li><a href="#ref-for-SecureContext③">4.2. XRRenderState</a>
    <li><a href="#ref-for-SecureContext④">5.1. XRFrame</a>
    <li><a href="#ref-for-SecureContext⑤">6.1. XRSpace</a>
    <li><a href="#ref-for-SecureContext⑥">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-SecureContext⑦">6.3. XRBoundedReferenceSpace</a>
    <li><a href="#ref-for-SecureContext⑧">7.1. XRView</a>
    <li><a href="#ref-for-SecureContext⑨">7.2. XRViewport</a>
    <li><a href="#ref-for-SecureContext①⓪">8.3. XRRigidTransform</a>
    <li><a href="#ref-for-SecureContext①①">9.1. XRPose</a>
    <li><a href="#ref-for-SecureContext①②">9.2. XRViewerPose</a>
    <li><a href="#ref-for-SecureContext①③">10.1. XRInputSource</a>
    <li><a href="#ref-for-SecureContext①④">10.3. XRInputSourceArray</a>
    <li><a href="#ref-for-SecureContext①⑤">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-SecureContext①⑥">12.1. XRSessionEvent</a>
    <li><a href="#ref-for-SecureContext①⑦">12.2. XRInputSourceEvent</a>
    <li><a href="#ref-for-SecureContext①⑧">12.3. XRInputSourcesChangeEvent</a>
    <li><a href="#ref-for-SecureContext①⑨">12.4. XRReferenceSpaceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-securityerror">
   <a href="https://heycam.github.io/webidl/#securityerror">https://heycam.github.io/webidl/#securityerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-securityerror">3.2. XR</a> <a href="#ref-for-securityerror①">(2)</a> <a href="#ref-for-securityerror②">(3)</a>
    <li><a href="#ref-for-securityerror③">6.1. XRSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-exceptiondef-typeerror">
   <a href="https://heycam.github.io/webidl/#exceptiondef-typeerror">https://heycam.github.io/webidl/#exceptiondef-typeerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-exceptiondef-typeerror">8.3. XRRigidTransform</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-boolean">
   <a href="https://heycam.github.io/webidl/#idl-boolean">https://heycam.github.io/webidl/#idl-boolean</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-boolean">3.2. XR</a>
    <li><a href="#ref-for-idl-boolean①">9.1. XRPose</a>
    <li><a href="#ref-for-idl-boolean②">11.1. XRWebGLLayer</a> <a href="#ref-for-idl-boolean③">(2)</a> <a href="#ref-for-idl-boolean④">(3)</a> <a href="#ref-for-idl-boolean⑤">(4)</a> <a href="#ref-for-idl-boolean⑥">(5)</a> <a href="#ref-for-idl-boolean⑦">(6)</a> <a href="#ref-for-idl-boolean⑧">(7)</a>
    <li><a href="#ref-for-idl-boolean⑨">11.2. WebGL Context Compatibility</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-double">
   <a href="https://heycam.github.io/webidl/#idl-double">https://heycam.github.io/webidl/#idl-double</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-double">4.2. XRRenderState</a> <a href="#ref-for-idl-double①">(2)</a> <a href="#ref-for-idl-double②">(3)</a> <a href="#ref-for-idl-double③">(4)</a> <a href="#ref-for-idl-double④">(5)</a> <a href="#ref-for-idl-double⑤">(6)</a>
    <li><a href="#ref-for-idl-double⑥">11.1. XRWebGLLayer</a> <a href="#ref-for-idl-double⑦">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dfn-frozen-array-type">
   <a href="https://heycam.github.io/webidl/#dfn-frozen-array-type">https://heycam.github.io/webidl/#dfn-frozen-array-type</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dfn-frozen-array-type">10.3. XRInputSourceArray</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dfn-indexed-property-getter">
   <a href="https://heycam.github.io/webidl/#dfn-indexed-property-getter">https://heycam.github.io/webidl/#dfn-indexed-property-getter</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dfn-indexed-property-getter">10.3. XRInputSourceArray</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-es-invoking-callback-functions">
   <a href="https://www.w3.org/TR/WebIDL-1/#es-invoking-callback-functions">https://www.w3.org/TR/WebIDL-1/#es-invoking-callback-functions</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-es-invoking-callback-functions">4.3. Animation Frames</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-long">
   <a href="https://heycam.github.io/webidl/#idl-long">https://heycam.github.io/webidl/#idl-long</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-long">4.1. XRSession</a> <a href="#ref-for-idl-long①">(2)</a>
    <li><a href="#ref-for-idl-long②">7.2. XRViewport</a> <a href="#ref-for-idl-long③">(2)</a> <a href="#ref-for-idl-long④">(3)</a> <a href="#ref-for-idl-long⑤">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-unsigned-long">
   <a href="https://heycam.github.io/webidl/#idl-unsigned-long">https://heycam.github.io/webidl/#idl-unsigned-long</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-unsigned-long">10.3. XRInputSourceArray</a> <a href="#ref-for-idl-unsigned-long①">(2)</a>
    <li><a href="#ref-for-idl-unsigned-long②">11.1. XRWebGLLayer</a> <a href="#ref-for-idl-unsigned-long③">(2)</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[DOM]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-document" style="color:initial">Document</span>
     <li><span class="dfn-paneled" id="term-for-event" style="color:initial">Event</span>
     <li><span class="dfn-paneled" id="term-for-dictdef-eventinit" style="color:initial">EventInit</span>
     <li><span class="dfn-paneled" id="term-for-eventtarget" style="color:initial">EventTarget</span>
     <li><span class="dfn-paneled" id="term-for-canceled-flag" style="color:initial">canceled flag</span>
     <li><span class="dfn-paneled" id="term-for-context-object" style="color:initial">context object</span>
     <li><span class="dfn-paneled" id="term-for-concept-event-dispatch" style="color:initial">dispatch</span>
     <li><span class="dfn-paneled" id="term-for-concept-event-fire" style="color:initial">fire an event</span>
     <li><span class="dfn-paneled" id="term-for-dom-event-type" style="color:initial">type</span>
    </ul>
   <li>
    <a data-link-type="biblio">[ECMASCRIPT]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-sec-isdetachedbuffer" style="color:initial">IsDetachedBuffer</span>
    </ul>
   <li>
    <a data-link-type="biblio">[feature-policy-1]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-default-allowlist" style="color:initial">default allowlist</span>
     <li><span class="dfn-paneled" id="term-for-policy-controlled-feature" style="color:initial">policy-controlled feature</span>
    </ul>
   <li>
    <a data-link-type="biblio">[geometry-1]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-dommatrix" style="color:initial">DOMMatrix</span>
     <li><span class="dfn-paneled" id="term-for-dictdef-dompointinit" style="color:initial">DOMPointInit</span>
     <li><span class="dfn-paneled" id="term-for-dompointreadonly" style="color:initial">DOMPointReadOnly</span>
     <li><span class="dfn-paneled" id="term-for-dom-dompointreadonly-w" style="color:initial">w</span>
     <li><span class="dfn-paneled" id="term-for-dom-dompointreadonly-x" style="color:initial">x</span>
     <li><span class="dfn-paneled" id="term-for-dom-dompointreadonly-y" style="color:initial">y</span>
     <li><span class="dfn-paneled" id="term-for-dom-dompointreadonly-z" style="color:initial">z</span>
    </ul>
   <li>
    <a data-link-type="biblio">[high resolution time]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-dom-domhighrestimestamp" style="color:initial">DOMHighResTimeStamp</span>
    </ul>
   <li>
    <a data-link-type="biblio">[HTML]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-eventhandler" style="color:initial">EventHandler</span>
     <li><span class="dfn-paneled" id="term-for-htmlcanvaselement" style="color:initial">HTMLCanvasElement</span>
     <li><span class="dfn-paneled" id="term-for-navigator" style="color:initial">Navigator</span>
     <li><span class="dfn-paneled" id="term-for-window" style="color:initial">Window</span>
     <li><span class="dfn-paneled" id="term-for-active-document" style="color:initial">active document</span>
     <li><span class="dfn-paneled" id="term-for-browsing-context" style="color:initial">browsing context</span>
     <li><span class="dfn-paneled" id="term-for-currently-focused-area-of-a-top-level-browsing-context" style="color:initial">currently focused area</span>
     <li><span class="dfn-paneled" id="term-for-event-handler-idl-attributes" style="color:initial">event handler idl attribute</span>
     <li><span class="dfn-paneled" id="term-for-dom-canvas-getcontext" style="color:initial">getContext(contextId)</span>
     <li><span class="dfn-paneled" id="term-for-in-parallel" style="color:initial">in parallel</span>
     <li><span class="dfn-paneled" id="term-for-concept-origin" style="color:initial">origin</span>
     <li><span class="dfn-paneled" id="term-for-queue-a-task" style="color:initial">queue a task</span>
     <li><span class="dfn-paneled" id="term-for-rendering-opportunity" style="color:initial">rendering opportunity</span>
     <li><span class="dfn-paneled" id="term-for-report-the-exception" style="color:initial">report the exception</span>
     <li><span class="dfn-paneled" id="term-for-dom-animationframeprovider-requestanimationframe" style="color:initial">requestAnimationFrame(callback)</span>
     <li><span class="dfn-paneled" id="term-for-responsible-document" style="color:initial">responsible</span>
     <li><span class="dfn-paneled" id="term-for-same-origin-domain" style="color:initial">same origin-domain</span>
     <li><span class="dfn-paneled" id="term-for-triggered-by-user-activation" style="color:initial">triggered by user activation</span>
    </ul>
   <li>
    <a data-link-type="biblio">[INFRA]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-list-append" style="color:initial">append</span>
     <li><span class="dfn-paneled" id="term-for-list-contain" style="color:initial">contain</span>
     <li><span class="dfn-paneled" id="term-for-list-extend" style="color:initial">extend</span>
     <li><span class="dfn-paneled" id="term-for-list" style="color:initial">list</span>
     <li><span class="dfn-paneled" id="term-for-list-remove" style="color:initial">remove</span>
     <li><span class="dfn-paneled" id="term-for-list-size" style="color:initial">size</span>
     <li><span class="dfn-paneled" id="term-for-string" style="color:initial">string</span>
    </ul>
   <li>
    <a data-link-type="biblio">[orientation sensor]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-absoluteorientationsensor" style="color:initial">AbsoluteOrientationSensor</span>
     <li><span class="dfn-paneled" id="term-for-relativeorientationsensor" style="color:initial">RelativeOrientationSensor</span>
    </ul>
   <li>
    <a data-link-type="biblio">[promises-guide]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-a-new-promise" style="color:initial">a new promise</span>
     <li><span class="dfn-paneled" id="term-for-reject-promise" style="color:initial">reject</span>
     <li><span class="dfn-paneled" id="term-for-resolve-promise" style="color:initial">resolve</span>
    </ul>
   <li>
    <a data-link-type="biblio">[webgl 2.0]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-WebGL2RenderingContext" style="color:initial">WebGL2RenderingContext</span>
    </ul>
   <li>
    <a data-link-type="biblio">[WEBGL-2]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-WebGLRenderingContextBase" style="color:initial">FRAMEBUFFER_UNSUPPORTED</span>
     <li><span class="dfn-paneled" id="term-for-WebGLRenderingContextBase①" style="color:initial">INVALID_FRAMEBUFFER_OPERATION</span>
     <li><span class="dfn-paneled" id="term-for-WebGLRenderingContextBase②" style="color:initial">INVALID_OPERATION</span>
     <li><span class="dfn-paneled" id="term-for-WebGLContextAttributes" style="color:initial">WebGLContextAttributes</span>
     <li><span class="dfn-paneled" id="term-for-WebGLFramebuffer" style="color:initial">WebGLFramebuffer</span>
     <li><span class="dfn-paneled" id="term-for-WebGLRenderingContext" style="color:initial">WebGLRenderingContext</span>
     <li><span class="dfn-paneled" id="term-for-WebGLRenderingContextBase③" style="color:initial">WebGLRenderingContextBase</span>
     <li><span class="dfn-paneled" id="term-for-actual-context-parameters" style="color:initial">actual context parameters</span>
     <li><span class="dfn-paneled" id="term-for-5.14.6" style="color:initial">checkFramebufferStatus</span>
     <li><span class="dfn-paneled" id="term-for-create-a-drawing-buffer" style="color:initial">create a drawing buffer</span>
     <li><span class="dfn-paneled" id="term-for-2.1" style="color:initial">create the webgl context</span>
     <li><span class="dfn-paneled" id="term-for-2.2" style="color:initial">default framebuffer</span>
     <li><span class="dfn-paneled" id="term-for-5.14.6①" style="color:initial">deleteFramebuffer</span>
     <li><span class="dfn-paneled" id="term-for-5.14.6②" style="color:initial">framebufferRenderbuffer</span>
     <li><span class="dfn-paneled" id="term-for-5.14.6③" style="color:initial">framebufferTexture2D</span>
     <li><span class="dfn-paneled" id="term-for-5.14.6④" style="color:initial">getFramebufferAttachmentParameter</span>
     <li><span class="dfn-paneled" id="term-for-CONTEXT_LOST" style="color:initial">handle the context loss</span>
     <li><span class="dfn-paneled" id="term-for-restore-the-drawing-buffer" style="color:initial">restore the context</span>
     <li><span class="dfn-paneled" id="term-for-5.14.10" style="color:initial">uniformMatrix4fv</span>
     <li><span class="dfn-paneled" id="term-for-webgl-context-lost-flag" style="color:initial">webgl context lost flag</span>
     <li><span class="dfn-paneled" id="term-for-5.15" style="color:initial">webgl task source</span>
     <li><span class="dfn-paneled" id="term-for-5.14.4" style="color:initial">webgl viewport</span>
    </ul>
   <li>
    <a data-link-type="biblio">[WebIDL]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-aborterror" style="color:initial">AbortError</span>
     <li><span class="dfn-paneled" id="term-for-idl-DOMException" style="color:initial">DOMException</span>
     <li><span class="dfn-paneled" id="term-for-idl-DOMString" style="color:initial">DOMString</span>
     <li><span class="dfn-paneled" id="term-for-Exposed" style="color:initial">Exposed</span>
     <li><span class="dfn-paneled" id="term-for-idl-Float32Array" style="color:initial">Float32Array</span>
     <li><span class="dfn-paneled" id="term-for-invalidstateerror" style="color:initial">InvalidStateError</span>
     <li><span class="dfn-paneled" id="term-for-NewObject" style="color:initial">NewObject</span>
     <li><span class="dfn-paneled" id="term-for-notsupportederror" style="color:initial">NotSupportedError</span>
     <li><span class="dfn-paneled" id="term-for-operationerror" style="color:initial">OperationError</span>
     <li><span class="dfn-paneled" id="term-for-SameObject" style="color:initial">SameObject</span>
     <li><span class="dfn-paneled" id="term-for-SecureContext" style="color:initial">SecureContext</span>
     <li><span class="dfn-paneled" id="term-for-securityerror" style="color:initial">SecurityError</span>
     <li><span class="dfn-paneled" id="term-for-exceptiondef-typeerror" style="color:initial">TypeError</span>
     <li><span class="dfn-paneled" id="term-for-idl-boolean" style="color:initial">boolean</span>
     <li><span class="dfn-paneled" id="term-for-idl-double" style="color:initial">double</span>
     <li><span class="dfn-paneled" id="term-for-dfn-frozen-array-type" style="color:initial">frozen array type</span>
     <li><span class="dfn-paneled" id="term-for-dfn-indexed-property-getter" style="color:initial">indexed property getter</span>
     <li><span class="dfn-paneled" id="term-for-es-invoking-callback-functions" style="color:initial">invoke the web idl callback function</span>
     <li><span class="dfn-paneled" id="term-for-idl-long" style="color:initial">long</span>
     <li><span class="dfn-paneled" id="term-for-idl-unsigned-long" style="color:initial">unsigned long</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-dom">[DOM]
   <dd>Anne van Kesteren. <a href="https://dom.spec.whatwg.org/">DOM Standard</a>. Living Standard. URL: <a href="https://dom.spec.whatwg.org/">https://dom.spec.whatwg.org/</a>
   <dt id="biblio-ecmascript">[ECMASCRIPT]
   <dd><a href="https://tc39.github.io/ecma262/">ECMAScript Language Specification</a>. URL: <a href="https://tc39.github.io/ecma262/">https://tc39.github.io/ecma262/</a>
   <dt id="biblio-feature-policy-1">[FEATURE-POLICY-1]
   <dd>Ian Clelland. <a href="https://www.w3.org/TR/feature-policy-1/">Feature Policy</a>. 16 April 2019. WD. URL: <a href="https://www.w3.org/TR/feature-policy-1/">https://www.w3.org/TR/feature-policy-1/</a>
   <dt id="biblio-geometry-1">[GEOMETRY-1]
   <dd>Simon Pieters; Chris Harrelson. <a href="https://www.w3.org/TR/geometry-1/">Geometry Interfaces Module Level 1</a>. 4 December 2018. CR. URL: <a href="https://www.w3.org/TR/geometry-1/">https://www.w3.org/TR/geometry-1/</a>
   <dt id="biblio-html">[HTML]
   <dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/">HTML Standard</a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a>
   <dt id="biblio-infra">[INFRA]
   <dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/">Infra Standard</a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a>
   <dt id="biblio-promises-guide">[PROMISES-GUIDE]
   <dd>Domenic Denicola. <a href="https://www.w3.org/2001/tag/doc/promises-guide">Writing Promise-Using Specifications</a>. 9 November 2018. TAG Finding. URL: <a href="https://www.w3.org/2001/tag/doc/promises-guide">https://www.w3.org/2001/tag/doc/promises-guide</a>
   <dt id="biblio-webgl-2">[WEBGL-2]
   <dd>Dean Jackson; Jeff Gilbert. <a href="https://www.khronos.org/registry/webgl/specs/latest/2.0/">WebGL 2.0 Specification</a>. 12 August 2017. URL: <a href="https://www.khronos.org/registry/webgl/specs/latest/2.0/">https://www.khronos.org/registry/webgl/specs/latest/2.0/</a>
   <dt id="biblio-webidl">[WebIDL]
   <dd>Boris Zbarsky. <a href="https://heycam.github.io/webidl/">Web IDL</a>. 15 December 2016. ED. URL: <a href="https://heycam.github.io/webidl/">https://heycam.github.io/webidl/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">IDL Index</span><a class="self-link" href="#idl-index"></a></h2>
<pre class="idl highlight def"><c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator" id="ref-for-navigator②"><c- g>Navigator</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext②⓪"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②③"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xr" id="ref-for-xr⑨"><c- n>XR</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XR" href="#dom-navigator-xr" id="ref-for-dom-navigator-xr②"><c- g>xr</c-></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①①⓪"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑨"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xr"><code><c- g>XR</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget③"><c- n>EventTarget</c-></a> {
  // Methods
  <c- b>Promise</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean①⓪"><c- b>boolean</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xr-issessionsupported" id="ref-for-dom-xr-issessionsupported①①"><c- g>isSessionSupported</c-></a>(<a class="n" data-link-type="idl-name" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①①"><c- n>XRSessionMode</c-></a> <a href="#dom-xr-issessionsupported-mode-mode"><code><c- g>mode</c-></code></a>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#NewObject" id="ref-for-NewObject④"><c- g>NewObject</c-></a>] <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession②①⓪"><c- n>XRSession</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xr-requestsession" id="ref-for-dom-xr-requestsession①①"><c- g>requestSession</c-></a>(<a class="n" data-link-type="idl-name" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode②①"><c- n>XRSessionMode</c-></a> <a href="#dom-xr-requestsession-mode-options-mode"><code><c- g>mode</c-></code></a>, <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="#dictdef-xrsessioninit" id="ref-for-dictdef-xrsessioninit③"><c- n>XRSessionInit</c-></a> <a href="#dom-xr-requestsession-mode-options-options"><code><c- g>options</c-></code></a> = {});

  // Events
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xr-ondevicechange" id="ref-for-dom-xr-ondevicechange①"><c- g>ondevicechange</c-></a>;
};

<c- b>enum</c-> <a href="#enumdef-xrsessionmode"><code><c- g>XRSessionMode</c-></code></a> {
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline②①"><c- s>"inline"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr②①"><c- s>"immersive-vr"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-immersive-ar" id="ref-for-dom-xrsessionmode-immersive-ar②"><c- s>"immersive-ar"</c-></a>
};

<c- b>dictionary</c-> <a href="#dictdef-xrsessioninit"><code><c- g>XRSessionInit</c-></code></a> {
  <c- b>sequence</c->&lt;<c- b>any</c->> <a class="idl-code" data-link-type="dict-member" data-type="sequence<any> " href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures①①"><c- g>requiredFeatures</c-></a>;
  <c- b>sequence</c->&lt;<c- b>any</c->> <a class="idl-code" data-link-type="dict-member" data-type="sequence<any> " href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures①①"><c- g>optionalFeatures</c-></a>;
};

<c- b>enum</c-> <a href="#enumdef-xrvisibilitystate"><code><c- g>XRVisibilityState</c-></code></a> {
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-visible" id="ref-for-dom-xrvisibilitystate-visible①①"><c- s>"visible"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-visible-blurred" id="ref-for-dom-xrvisibilitystate-visible-blurred①"><c- s>"visible-blurred"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden③"><c- s>"hidden"</c-></a>,
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext②①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①①⓪"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrsession"><code><c- g>XRSession</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget①①"><c- n>EventTarget</c-></a> {
  // Attributes
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-xrvisibilitystate" id="ref-for-enumdef-xrvisibilitystate①"><c- n>XRVisibilityState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRVisibilityState" href="#dom-xrsession-visibilitystate" id="ref-for-dom-xrsession-visibilitystate②"><c- g>visibilityState</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①①⓪"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrenderstate" id="ref-for-xrrenderstate①⓪"><c- n>XRRenderState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRenderState" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate⑤"><c- g>renderState</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②②"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray⑤"><c- n>XRInputSourceArray</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSourceArray" href="#dom-xrsession-inputsources" id="ref-for-dom-xrsession-inputsources③"><c- g>inputSources</c-></a>;

  // Methods
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-xrsession-updaterenderstate" id="ref-for-dom-xrsession-updaterenderstate②"><c- g>updateRenderState</c-></a>(<c- b>optional</c-> <a class="n" data-link-type="idl-name" href="#dictdef-xrrenderstateinit" id="ref-for-dictdef-xrrenderstateinit②"><c- n>XRRenderStateInit</c-></a> <a href="#dom-xrsession-updaterenderstate-state-state"><code><c- g>state</c-></code></a> = {});
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#NewObject" id="ref-for-NewObject①①"><c- g>NewObject</c-></a>] <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace①①⓪"><c- n>XRReferenceSpace</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsession-requestreferencespace" id="ref-for-dom-xrsession-requestreferencespace③"><c- g>requestReferenceSpace</c-></a>(<a class="n" data-link-type="idl-name" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype①①"><c- n>XRReferenceSpaceType</c-></a> <a href="#dom-xrsession-requestreferencespace-type-type"><code><c- g>type</c-></code></a>);

  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long⑥"><c- b>long</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe①⓪"><c- g>requestAnimationFrame</c-></a>(<a class="n" data-link-type="idl-name" href="#callbackdef-xrframerequestcallback" id="ref-for-callbackdef-xrframerequestcallback③"><c- n>XRFrameRequestCallback</c-></a> <a href="#dom-xrsession-requestanimationframe-callback-callback"><code><c- g>callback</c-></code></a>);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-xrsession-cancelanimationframe" id="ref-for-dom-xrsession-cancelanimationframe①"><c- g>cancelAnimationFrame</c-></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long①①"><c- b>long</c-></a> <a href="#dom-xrsession-cancelanimationframe-handle-handle"><code><c- g>handle</c-></code></a>);

  <c- b>Promise</c->&lt;<c- b>void</c->> <a class="idl-code" data-link-type="method" href="#dom-xrsession-end" id="ref-for-dom-xrsession-end②"><c- g>end</c-></a>();

  // Events
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①②"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onend" id="ref-for-dom-xrsession-onend①"><c- g>onend</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler②①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-oninputsourceschange" id="ref-for-dom-xrsession-oninputsourceschange①"><c- g>oninputsourceschange</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler③①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselect" id="ref-for-dom-xrsession-onselect①"><c- g>onselect</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler④①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselectstart" id="ref-for-dom-xrsession-onselectstart①"><c- g>onselectstart</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑤①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselectend" id="ref-for-dom-xrsession-onselectend①"><c- g>onselectend</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑥①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueeze" id="ref-for-dom-xrsession-onsqueeze①"><c- g>onsqueeze</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑦①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueezestart" id="ref-for-dom-xrsession-onsqueezestart①"><c- g>onsqueezestart</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑧①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueezeend" id="ref-for-dom-xrsession-onsqueezeend①"><c- g>onsqueezeend</c-></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑨①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onvisibilitychange" id="ref-for-dom-xrsession-onvisibilitychange①"><c- g>onvisibilitychange</c-></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-xrrenderstateinit"><code><c- g>XRRenderStateInit</c-></code></a> {
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double⑧"><c- b>double</c-></a> <a data-type="double " href="#dom-xrrenderstateinit-depthnear"><code><c- g>depthNear</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double①①"><c- b>double</c-></a> <a data-type="double " href="#dom-xrrenderstateinit-depthfar"><code><c- g>depthFar</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double②①"><c- b>double</c-></a> <a data-type="double " href="#dom-xrrenderstateinit-inlineverticalfieldofview"><code><c- g>inlineVerticalFieldOfView</c-></code></a>;
  <a class="n" data-link-type="idl-name" href="#xrwebgllayer" id="ref-for-xrwebgllayer①①⓪"><c- n>XRWebGLLayer</c-></a>? <a data-type="XRWebGLLayer? " href="#dom-xrrenderstateinit-baselayer"><code><c- g>baseLayer</c-></code></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext③①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed②①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrrenderstate"><code><c- g>XRRenderState</c-></code></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double③①"><c- b>double</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="double" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear③①"><c- g>depthNear</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double④①"><c- b>double</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="double" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar③①"><c- g>depthFar</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double⑤①"><c- b>double</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="double?" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑤①"><c- g>inlineVerticalFieldOfView</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrwebgllayer" id="ref-for-xrwebgllayer②⑤"><c- n>XRWebGLLayer</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRWebGLLayer?" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer②①"><c- g>baseLayer</c-></a>;
};

<c- b>callback</c-> <a href="#callbackdef-xrframerequestcallback"><code><c- g>XRFrameRequestCallback</c-></code></a> = <c- b>void</c-> (<a class="n" data-link-type="idl-name" href="https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp" id="ref-for-dom-domhighrestimestamp①"><c- n>DOMHighResTimeStamp</c-></a> <a href="#dom-xrframerequestcallback-time"><code><c- g>time</c-></code></a>, <a class="n" data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe③④"><c- n>XRFrame</c-></a> <a href="#dom-xrframerequestcallback-frame"><code><c- g>frame</c-></code></a>);

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext④①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed③①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrframe"><code><c- g>XRFrame</c-></code></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject③①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession⑥⑧①"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①⑦"><c- g>session</c-></a>;

  <a class="n" data-link-type="idl-name" href="#xrviewerpose" id="ref-for-xrviewerpose①②"><c- n>XRViewerPose</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose①①"><c- g>getViewerPose</c-></a>(<a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace④①"><c- n>XRReferenceSpace</c-></a> <a href="#dom-xrframe-getviewerpose-referencespace-referencespace"><code><c- g>referenceSpace</c-></code></a>);
  <a class="n" data-link-type="idl-name" href="#xrpose" id="ref-for-xrpose①④"><c- n>XRPose</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrframe-getpose" id="ref-for-dom-xrframe-getpose②"><c- g>getPose</c-></a>(<a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace②②"><c- n>XRSpace</c-></a> <a href="#dom-xrframe-getpose-space-basespace-space"><code><c- g>space</c-></code></a>, <a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①①⓪"><c- n>XRSpace</c-></a> <a href="#dom-xrframe-getpose-space-basespace-basespace"><code><c- g>baseSpace</c-></code></a>);
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑤①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed④①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrspace"><code><c- g>XRSpace</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget②①"><c- n>EventTarget</c-></a> {

};

<c- b>enum</c-> <a href="#enumdef-xrreferencespacetype"><code><c- g>XRReferenceSpaceType</c-></code></a> {
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer②①"><c- s>"viewer"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local③①"><c- s>"local"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor①②"><c- s>"local-floor"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor③①"><c- s>"bounded-floor"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded①①"><c- s>"unbounded"</c-></a>
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑥①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑤①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrreferencespace"><code><c- g>XRReferenceSpace</c-></code></a> : <a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①④①"><c- n>XRSpace</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#NewObject" id="ref-for-NewObject②①"><c- g>NewObject</c-></a>] <a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace⑨①"><c- n>XRReferenceSpace</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace⑤"><c- g>getOffsetReferenceSpace</c-></a>(<a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②④"><c- n>XRRigidTransform</c-></a> <a href="#dom-xrreferencespace-getoffsetreferencespace-originoffset-originoffset"><code><c- g>originOffset</c-></code></a>);

  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①⓪①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrreferencespace-onreset" id="ref-for-dom-xrreferencespace-onreset①"><c- g>onreset</c-></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑦①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑥①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrboundedreferencespace"><code><c- g>XRBoundedReferenceSpace</c-></code></a> : <a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace②④①"><c- n>XRReferenceSpace</c-></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly⑥"><c- n>DOMPointReadOnly</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMPointReadOnly>" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑤①"><c- g>boundsGeometry</c-></a>;
};

<c- b>enum</c-> <a href="#enumdef-xreye"><code><c- g>XREye</c-></code></a> {
  <a href="#dom-xreye-none"><code><c- s>"none"</c-></code></a>,
  <a href="#dom-xreye-left"><code><c- s>"left"</c-></code></a>,
  <a href="#dom-xreye-right"><code><c- s>"right"</c-></code></a>
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑧①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑦①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrview"><code><c- g>XRView</c-></code></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-xreye" id="ref-for-enumdef-xreye①①"><c- n>XREye</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XREye" href="#dom-xrview-eye" id="ref-for-dom-xrview-eye①①"><c- g>eye</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-Float32Array" id="ref-for-idl-Float32Array④"><c- b>Float32Array</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array" href="#dom-xrview-projectionmatrix" id="ref-for-dom-xrview-projectionmatrix②①"><c- g>projectionMatrix</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject④①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform④①"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrview-transform" id="ref-for-dom-xrview-transform①①"><c- g>transform</c-></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑨①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑧①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrviewport"><code><c- g>XRViewport</c-></code></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long②①"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x④"><c- g>x</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long③①"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y④"><c- g>y</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long④①"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-width" id="ref-for-dom-xrviewport-width③"><c- g>width</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long⑤①"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-height" id="ref-for-dom-xrviewport-height③"><c- g>height</c-></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⓪①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑨①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrrigidtransform"><code><c- g>XRRigidTransform</c-></code></a> {
  <a class="idl-code" data-link-type="constructor" href="#dom-xrrigidtransform-xrrigidtransform" id="ref-for-dom-xrrigidtransform-xrrigidtransform①"><c- g>constructor</c-></a>(<c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit④"><c- n>DOMPointInit</c-></a> <a href="#dom-xrrigidtransform-xrrigidtransform-position-orientation-position"><code><c- g>position</c-></code></a> = {}, <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit①①"><c- n>DOMPointInit</c-></a> <a href="#dom-xrrigidtransform-xrrigidtransform-position-orientation-orientation"><code><c- g>orientation</c-></code></a> = {});
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑤①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly④①"><c- n>DOMPointReadOnly</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑤①"><c- g>position</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑥①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly⑤①"><c- n>DOMPointReadOnly</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑤①"><c- g>orientation</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-Float32Array" id="ref-for-idl-Float32Array③①"><c- b>Float32Array</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix⑥"><c- g>matrix</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑦①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑨①"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse②①"><c- g>inverse</c-></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①①①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⓪①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrpose"><code><c- g>XRPose</c-></code></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑧①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②①①"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform②①"><c- g>transform</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean①①"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑥①"><c- g>emulatedPosition</c-></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①②①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①①①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrviewerpose"><code><c- g>XRViewerPose</c-></code></a> : <a class="n" data-link-type="idl-name" href="#xrpose" id="ref-for-xrpose①⓪①"><c- n>XRPose</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject⑨①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrview" id="ref-for-xrview⑨①"><c- n>XRView</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRView>" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views①①"><c- g>views</c-></a>;
};

<c- b>enum</c-> <a href="#enumdef-xrhandedness"><code><c- g>XRHandedness</c-></code></a> {
  <a href="#dom-xrhandedness-none"><code><c- s>"none"</c-></code></a>,
  <a href="#dom-xrhandedness-left"><code><c- s>"left"</c-></code></a>,
  <a href="#dom-xrhandedness-right"><code><c- s>"right"</c-></code></a>
};

<c- b>enum</c-> <a href="#enumdef-xrtargetraymode"><code><c- g>XRTargetRayMode</c-></code></a> {
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-gaze" id="ref-for-dom-xrtargetraymode-gaze②"><c- s>"gaze"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-tracked-pointer" id="ref-for-dom-xrtargetraymode-tracked-pointer①"><c- s>"tracked-pointer"</c-></a>,
  <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-screen" id="ref-for-dom-xrtargetraymode-screen③"><c- s>"screen"</c-></a>
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①③①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①②①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrinputsource"><code><c- g>XRInputSource</c-></code></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-xrhandedness" id="ref-for-enumdef-xrhandedness①"><c- n>XRHandedness</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRHandedness" href="#dom-xrinputsource-handedness" id="ref-for-dom-xrinputsource-handedness①①"><c- g>handedness</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-xrtargetraymode" id="ref-for-enumdef-xrtargetraymode①"><c- n>XRTargetRayMode</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRTargetRayMode" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode①①"><c- g>targetRayMode</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⓪①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①⑦①"><c- n>XRSpace</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSpace" href="#dom-xrinputsource-targetrayspace" id="ref-for-dom-xrinputsource-targetrayspace②①"><c- g>targetRaySpace</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①①①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①⑧①"><c- n>XRSpace</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSpace?" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace③①"><c- g>gripSpace</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①②①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString②①"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMString>" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles①①"><c- g>profiles</c-></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①④①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①③①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrinputsourcearray"><code><c- g>XRInputSourceArray</c-></code></a> {
  <c- b>iterable</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource①④①"><c- n>XRInputSource</c-></a>>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long④"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrinputsourcearray-length" id="ref-for-dom-xrinputsourcearray-length①"><c- g>length</c-></a>;
  <c- b>getter</c-> <a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource①⑤①"><c- n>XRInputSource</c-></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long①①"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-xrinputsourcearray-__getter__-index-index"><code><c- g>index</c-></code></a>);
};

<c- b>typedef</c-> (<a class="n" data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext①①"><c- n>WebGLRenderingContext</c-></a> <c- b>or</c->
         <a class="n" data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext" id="ref-for-WebGL2RenderingContext②"><c- n>WebGL2RenderingContext</c-></a>) <a href="#typedefdef-xrwebglrenderingcontext"><code><c- g>XRWebGLRenderingContext</c-></code></a>;

<c- b>dictionary</c-> <a href="#dictdef-xrwebgllayerinit"><code><c- g>XRWebGLLayerInit</c-></code></a> {
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean②①"><c- b>boolean</c-></a> <a data-default="true" data-type="boolean " href="#dom-xrwebgllayerinit-antialias"><code><c- g>antialias</c-></code></a> = <c- b>true</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean③①"><c- b>boolean</c-></a> <a data-default="true" data-type="boolean " href="#dom-xrwebgllayerinit-depth"><code><c- g>depth</c-></code></a> = <c- b>true</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean④①"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean " href="#dom-xrwebgllayerinit-stencil"><code><c- g>stencil</c-></code></a> = <c- b>false</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑤①"><c- b>boolean</c-></a> <a data-default="true" data-type="boolean " href="#dom-xrwebgllayerinit-alpha"><code><c- g>alpha</c-></code></a> = <c- b>true</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑥①"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean " href="#dom-xrwebgllayerinit-ignoredepthvalues"><code><c- g>ignoreDepthValues</c-></code></a> = <c- b>false</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double⑥①"><c- b>double</c-></a> <a data-default="1.0" data-type="double " href="#dom-xrwebgllayerinit-framebufferscalefactor"><code><c- g>framebufferScaleFactor</c-></code></a> = 1.0;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑤①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①④①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrwebgllayer"><code><c- g>XRWebGLLayer</c-></code></a> {
  <a class="idl-code" data-link-type="constructor" href="#dom-xrwebgllayer-xrwebgllayer" id="ref-for-dom-xrwebgllayer-xrwebgllayer①"><c- g>constructor</c-></a>(<a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession⑨⓪①"><c- n>XRSession</c-></a> <a href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-session"><code><c- g>session</c-></code></a>,
             <a class="n" data-link-type="idl-name" href="#typedefdef-xrwebglrenderingcontext" id="ref-for-typedefdef-xrwebglrenderingcontext①"><c- n>XRWebGLRenderingContext</c-></a> <a href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-context"><code><c- g>context</c-></code></a>,
             <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="#dictdef-xrwebgllayerinit" id="ref-for-dictdef-xrwebgllayerinit②"><c- n>XRWebGLLayerInit</c-></a> <a href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-layerinit"><code><c- g>layerInit</c-></code></a> = {});
  // Attributes
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑦①"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrwebgllayer-antialias" id="ref-for-dom-xrwebgllayer-antialias③"><c- g>antialias</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑧①"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues④"><c- g>ignoreDepthValues</c-></a>;

  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①③①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer④"><c- n>WebGLFramebuffer</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="WebGLFramebuffer?" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer⑥"><c- g>framebuffer</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long②①"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrwebgllayer-framebufferwidth" id="ref-for-dom-xrwebgllayer-framebufferwidth①"><c- g>framebufferWidth</c-></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long③①"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrwebgllayer-framebufferheight" id="ref-for-dom-xrwebgllayer-framebufferheight①"><c- g>framebufferHeight</c-></a>;

  // Methods
  <a class="n" data-link-type="idl-name" href="#xrviewport" id="ref-for-xrviewport③①"><c- n>XRViewport</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrwebgllayer-getviewport" id="ref-for-dom-xrwebgllayer-getviewport②"><c- g>getViewport</c-></a>(<a class="n" data-link-type="idl-name" href="#xrview" id="ref-for-xrview①②①"><c- n>XRView</c-></a> <a href="#dom-xrwebgllayer-getviewport-view-view"><code><c- g>view</c-></code></a>);

  // Static Methods
  <c- b>static</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double⑦①"><c- b>double</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrwebgllayer-getnativeframebufferscalefactor" id="ref-for-dom-xrwebgllayer-getnativeframebufferscalefactor①"><c- g>getNativeFramebufferScaleFactor</c-></a>(<a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession⑨①①"><c- n>XRSession</c-></a> <a href="#dom-xrwebgllayer-getnativeframebufferscalefactor-session-session"><code><c- g>session</c-></code></a>);
};

<c- b>partial</c-> <c- b>dictionary</c-> <a class="idl-code" data-link-type="dictionary" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes②①"><c- g>WebGLContextAttributes</c-></a> {
    <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑨①"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean " href="#dom-webglcontextattributes-xrcompatible"><code><c- g>xrCompatible</c-></code></a> = <c- b>false</c->;
};

<c- b>partial</c-> <c- b>interface</c-> <c- b>mixin</c-> <a class="idl-code" data-link-type="interface" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase④①"><c- g>WebGLRenderingContextBase</c-></a> {
    [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#NewObject" id="ref-for-NewObject③①"><c- g>NewObject</c-></a>] <c- b>Promise</c->&lt;<c- b>void</c->> <a class="idl-code" data-link-type="method" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible②"><c- g>makeXRCompatible</c-></a>();
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑥①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑤①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrsessionevent"><code><c- g>XRSessionEvent</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event⑤"><c- n>Event</c-></a> {
  <a href="#dom-xrsessionevent-xrsessionevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString④①"><c- b>DOMString</c-></a> <a href="#dom-xrsessionevent-xrsessionevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a class="n" data-link-type="idl-name" href="#dictdef-xrsessioneventinit" id="ref-for-dictdef-xrsessioneventinit①"><c- n>XRSessionEventInit</c-></a> <a href="#dom-xrsessionevent-xrsessionevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①④①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①⓪⓪①"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrsessionevent-session" id="ref-for-dom-xrsessionevent-session①"><c- g>session</c-></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-xrsessioneventinit"><code><c- g>XRSessionEventInit</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit④"><c- n>EventInit</c-></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①⓪①①"><c- n>XRSession</c-></a> <a data-type="XRSession " href="#dom-xrsessioneventinit-session"><code><c- g>session</c-></code></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑦①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑥①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrinputsourceevent"><code><c- g>XRInputSourceEvent</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event①①"><c- n>Event</c-></a> {
  <a href="#dom-xrinputsourceevent-xrinputsourceevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑤①"><c- b>DOMString</c-></a> <a href="#dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a class="n" data-link-type="idl-name" href="#dictdef-xrinputsourceeventinit" id="ref-for-dictdef-xrinputsourceeventinit①"><c- n>XRInputSourceEventInit</c-></a> <a href="#dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑤①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe③⓪①"><c- n>XRFrame</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRFrame" href="#dom-xrinputsourceevent-frame" id="ref-for-dom-xrinputsourceevent-frame③"><c- g>frame</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑥①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource①⑨①"><c- n>XRInputSource</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSource" href="#dom-xrinputsourceevent-inputsource" id="ref-for-dom-xrinputsourceevent-inputsource②"><c- g>inputSource</c-></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-xrinputsourceeventinit"><code><c- g>XRInputSourceEventInit</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit①①"><c- n>EventInit</c-></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe③①①"><c- n>XRFrame</c-></a> <a data-type="XRFrame " href="#dom-xrinputsourceeventinit-frame"><code><c- g>frame</c-></code></a>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⓪①"><c- n>XRInputSource</c-></a> <a data-type="XRInputSource " href="#dom-xrinputsourceeventinit-inputsource"><code><c- g>inputSource</c-></code></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑧①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑦①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrinputsourceschangeevent"><code><c- g>XRInputSourcesChangeEvent</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event②①"><c- n>Event</c-></a> {
  <a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑥①"><c- b>DOMString</c-></a> <a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a class="n" data-link-type="idl-name" href="#dictdef-xrinputsourceschangeeventinit" id="ref-for-dictdef-xrinputsourceschangeeventinit①"><c- n>XRInputSourcesChangeEventInit</c-></a> <a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑦①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①⓪④①"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrinputsourceschangeevent-session" id="ref-for-dom-xrinputsourceschangeevent-session①"><c- g>session</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑧①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②④①"><c- n>XRInputSource</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRInputSource>" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added②①"><c- g>added</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①⑨①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑤①"><c- n>XRInputSource</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRInputSource>" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed②①"><c- g>removed</c-></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-xrinputsourceschangeeventinit"><code><c- g>XRInputSourcesChangeEventInit</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit②①"><c- n>EventInit</c-></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①⓪⑤①"><c- n>XRSession</c-></a> <a data-type="XRSession " href="#dom-xrinputsourceschangeeventinit-session"><code><c- g>session</c-></code></a>;
  <c- b>required</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑥①"><c- n>XRInputSource</c-></a>> <a data-type="FrozenArray<XRInputSource> " href="#dom-xrinputsourceschangeeventinit-added"><code><c- g>added</c-></code></a>;
  <c- b>required</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑦①"><c- n>XRInputSource</c-></a>> <a data-type="FrozenArray<XRInputSource> " href="#dom-xrinputsourceschangeeventinit-removed"><code><c- g>removed</c-></code></a>;

};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑨①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑧①"><c- g>Exposed</c-></a>=<c- n>Window</c->]
<c- b>interface</c-> <a href="#xrreferencespaceevent"><code><c- g>XRReferenceSpaceEvent</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event③①"><c- n>Event</c-></a> {
  <a href="#dom-xrreferencespaceevent-xrreferencespaceevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑦①"><c- b>DOMString</c-></a> <a href="#dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a class="n" data-link-type="idl-name" href="#dictdef-xrreferencespaceeventinit" id="ref-for-dictdef-xrreferencespaceeventinit①"><c- n>XRReferenceSpaceEventInit</c-></a> <a href="#dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②⓪①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace②⑨①"><c- n>XRReferenceSpace</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRReferenceSpace" href="#dom-xrreferencespaceevent-referencespace" id="ref-for-dom-xrreferencespaceevent-referencespace②"><c- g>referenceSpace</c-></a>;
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②①①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②②①"><c- n>XRRigidTransform</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform?" href="#dom-xrreferencespaceevent-transform" id="ref-for-dom-xrreferencespaceevent-transform①"><c- g>transform</c-></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-xrreferencespaceeventinit"><code><c- g>XRReferenceSpaceEventInit</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit③①"><c- n>EventInit</c-></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace③⓪①"><c- n>XRReferenceSpace</c-></a> <a data-type="XRReferenceSpace " href="#dom-xrreferencespaceeventinit-referencespace"><code><c- g>referenceSpace</c-></code></a>;
  <a class="n" data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②③①"><c- n>XRRigidTransform</c-></a> <a data-type="XRRigidTransform " href="#dom-xrreferencespaceeventinit-transform"><code><c- g>transform</c-></code></a>;
};

</pre>
  <aside class="dfn-panel" data-for="3dof">
   <b><a href="#3dof">#3dof</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-3dof">1.1. Terminology</a> <a href="#ref-for-3dof①">(2)</a>
    <li><a href="#ref-for-3dof②">6.1. XRSpace</a> <a href="#ref-for-3dof③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="6dof">
   <b><a href="#6dof">#6dof</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-6dof">1. Introduction</a>
    <li><a href="#ref-for-6dof①">1.1. Terminology</a>
    <li><a href="#ref-for-6dof②">6.1. XRSpace</a> <a href="#ref-for-6dof③">(2)</a>
    <li><a href="#ref-for-6dof④">6.2. XRReferenceSpace</a> <a href="#ref-for-6dof⑤">(2)</a>
    <li><a href="#ref-for-6dof⑥">9.1. XRPose</a>
    <li><a href="#ref-for-6dof⑦">13.5.3. Reference spaces</a> <a href="#ref-for-6dof⑧">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xr-device">
   <b><a href="#xr-device">#xr-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xr-device">1.1. Terminology</a> <a href="#ref-for-xr-device①">(2)</a>
    <li><a href="#ref-for-xr-device②">2.1. XR device</a> <a href="#ref-for-xr-device③">(2)</a> <a href="#ref-for-xr-device④">(3)</a> <a href="#ref-for-xr-device⑤">(4)</a>
    <li><a href="#ref-for-xr-device⑥">3.2. XR</a> <a href="#ref-for-xr-device⑦">(2)</a> <a href="#ref-for-xr-device⑧">(3)</a>
    <li><a href="#ref-for-xr-device⑨">4.1. XRSession</a>
    <li><a href="#ref-for-xr-device①⓪">6.1. XRSpace</a>
    <li><a href="#ref-for-xr-device①①">10.1. XRInputSource</a>
    <li><a href="#ref-for-xr-device①②">10.2. Transient input</a>
    <li><a href="#ref-for-xr-device①③">13.4. Data adjustments</a>
    <li><a href="#ref-for-xr-device①④">13.5.1. Immersiveness</a>
    <li><a href="#ref-for-xr-device①⑤">13.5.2. Poses</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="list-of-supported-modes">
   <b><a href="#list-of-supported-modes">#list-of-supported-modes</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-of-supported-modes">2.1. XR device</a>
    <li><a href="#ref-for-list-of-supported-modes①">3.2. XR</a> <a href="#ref-for-list-of-supported-modes②">(2)</a>
    <li><a href="#ref-for-list-of-supported-modes③">3.3. XRSessionMode</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="inline-xr-device">
   <b><a href="#inline-xr-device">#inline-xr-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-inline-xr-device">2.1. XR device</a> <a href="#ref-for-inline-xr-device①">(2)</a> <a href="#ref-for-inline-xr-device②">(3)</a> <a href="#ref-for-inline-xr-device③">(4)</a>
    <li><a href="#ref-for-inline-xr-device④">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-navigator-xr">
   <b><a href="#dom-navigator-xr">#dom-navigator-xr</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-navigator-xr">3.1. navigator.xr</a>
    <li><a href="#ref-for-dom-navigator-xr①">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xr">
   <b><a href="#xr">#xr</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xr">3.1. navigator.xr</a> <a href="#ref-for-xr①">(2)</a>
    <li><a href="#ref-for-xr②">3.2. XR</a> <a href="#ref-for-xr③">(2)</a> <a href="#ref-for-xr④">(3)</a> <a href="#ref-for-xr⑤">(4)</a> <a href="#ref-for-xr⑥">(5)</a>
    <li><a href="#ref-for-xr⑦">4.1. XRSession</a>
    <li><a href="#ref-for-xr⑧">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="list-of-immersive-xr-devices">
   <b><a href="#list-of-immersive-xr-devices">#list-of-immersive-xr-devices</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-of-immersive-xr-devices">3.2. XR</a> <a href="#ref-for-list-of-immersive-xr-devices①">(2)</a> <a href="#ref-for-list-of-immersive-xr-devices②">(3)</a> <a href="#ref-for-list-of-immersive-xr-devices③">(4)</a> <a href="#ref-for-list-of-immersive-xr-devices④">(5)</a> <a href="#ref-for-list-of-immersive-xr-devices⑤">(6)</a> <a href="#ref-for-list-of-immersive-xr-devices⑥">(7)</a> <a href="#ref-for-list-of-immersive-xr-devices⑦">(8)</a> <a href="#ref-for-list-of-immersive-xr-devices⑧">(9)</a> <a href="#ref-for-list-of-immersive-xr-devices⑨">(10)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xr-immersive-xr-device">
   <b><a href="#xr-immersive-xr-device">#xr-immersive-xr-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xr-immersive-xr-device">2.1. XR device</a>
    <li><a href="#ref-for-xr-immersive-xr-device①">3.2. XR</a> <a href="#ref-for-xr-immersive-xr-device②">(2)</a> <a href="#ref-for-xr-immersive-xr-device③">(3)</a> <a href="#ref-for-xr-immersive-xr-device④">(4)</a> <a href="#ref-for-xr-immersive-xr-device⑤">(5)</a> <a href="#ref-for-xr-immersive-xr-device⑥">(6)</a> <a href="#ref-for-xr-immersive-xr-device⑦">(7)</a> <a href="#ref-for-xr-immersive-xr-device⑧">(8)</a> <a href="#ref-for-xr-immersive-xr-device⑨">(9)</a> <a href="#ref-for-xr-immersive-xr-device①⓪">(10)</a> <a href="#ref-for-xr-immersive-xr-device①①">(11)</a>
    <li><a href="#ref-for-xr-immersive-xr-device①②">3.3. XRSessionMode</a> <a href="#ref-for-xr-immersive-xr-device①③">(2)</a> <a href="#ref-for-xr-immersive-xr-device①④">(3)</a> <a href="#ref-for-xr-immersive-xr-device①⑤">(4)</a>
    <li><a href="#ref-for-xr-immersive-xr-device①⑥">4.2. XRRenderState</a>
    <li><a href="#ref-for-xr-immersive-xr-device①⑦">11.2. WebGL Context Compatibility</a> <a href="#ref-for-xr-immersive-xr-device①⑧">(2)</a> <a href="#ref-for-xr-immersive-xr-device①⑨">(3)</a> <a href="#ref-for-xr-immersive-xr-device②⓪">(4)</a> <a href="#ref-for-xr-immersive-xr-device②①">(5)</a> <a href="#ref-for-xr-immersive-xr-device②②">(6)</a> <a href="#ref-for-xr-immersive-xr-device②③">(7)</a> <a href="#ref-for-xr-immersive-xr-device②④">(8)</a> <a href="#ref-for-xr-immersive-xr-device②⑤">(9)</a> <a href="#ref-for-xr-immersive-xr-device②⑥">(10)</a> <a href="#ref-for-xr-immersive-xr-device②⑦">(11)</a> <a href="#ref-for-xr-immersive-xr-device②⑧">(12)</a>
    <li><a href="#ref-for-xr-immersive-xr-device②⑨">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumerate-immersive-xr-devices">
   <b><a href="#enumerate-immersive-xr-devices">#enumerate-immersive-xr-devices</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumerate-immersive-xr-devices">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="select-an-immersive-xr-device">
   <b><a href="#select-an-immersive-xr-device">#select-an-immersive-xr-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-select-an-immersive-xr-device">3.2. XR</a> <a href="#ref-for-select-an-immersive-xr-device①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="ensures-an-immersive-xr-device-is-selected">
   <b><a href="#ensures-an-immersive-xr-device-is-selected">#ensures-an-immersive-xr-device-is-selected</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-ensures-an-immersive-xr-device-is-selected">3.2. XR</a> <a href="#ref-for-ensures-an-immersive-xr-device-is-selected①">(2)</a>
    <li><a href="#ref-for-ensures-an-immersive-xr-device-is-selected②">11.2. WebGL Context Compatibility</a> <a href="#ref-for-ensures-an-immersive-xr-device-is-selected③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xr-ondevicechange">
   <b><a href="#dom-xr-ondevicechange">#dom-xr-ondevicechange</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xr-ondevicechange">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xr-issessionsupported">
   <b><a href="#dom-xr-issessionsupported">#dom-xr-issessionsupported</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xr-issessionsupported">1.2. Application flow</a>
    <li><a href="#ref-for-dom-xr-issessionsupported①">3.2. XR</a> <a href="#ref-for-dom-xr-issessionsupported②">(2)</a> <a href="#ref-for-dom-xr-issessionsupported③">(3)</a>
    <li><a href="#ref-for-dom-xr-issessionsupported④">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="pending-immersive-session">
   <b><a href="#pending-immersive-session">#pending-immersive-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-pending-immersive-session">3.2. XR</a> <a href="#ref-for-pending-immersive-session①">(2)</a> <a href="#ref-for-pending-immersive-session②">(3)</a> <a href="#ref-for-pending-immersive-session③">(4)</a> <a href="#ref-for-pending-immersive-session④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="active-immersive-session">
   <b><a href="#active-immersive-session">#active-immersive-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-active-immersive-session">3.2. XR</a> <a href="#ref-for-active-immersive-session①">(2)</a> <a href="#ref-for-active-immersive-session②">(3)</a>
    <li><a href="#ref-for-active-immersive-session③">4.1. XRSession</a> <a href="#ref-for-active-immersive-session④">(2)</a>
    <li><a href="#ref-for-active-immersive-session⑤">4.3. Animation Frames</a>
    <li><a href="#ref-for-active-immersive-session⑥">13.3. Mid-session consent</a> <a href="#ref-for-active-immersive-session⑦">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="list-of-inline-sessions">
   <b><a href="#list-of-inline-sessions">#list-of-inline-sessions</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-of-inline-sessions">3.2. XR</a>
    <li><a href="#ref-for-list-of-inline-sessions①">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xr-requestsession">
   <b><a href="#dom-xr-requestsession">#dom-xr-requestsession</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xr-requestsession">1.2. Application flow</a>
    <li><a href="#ref-for-dom-xr-requestsession①">3.2. XR</a>
    <li><a href="#ref-for-dom-xr-requestsession②">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-dom-xr-requestsession③">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xr-requestsession④">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-xrsessionmode">
   <b><a href="#enumdef-xrsessionmode">#enumdef-xrsessionmode</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-xrsessionmode">2.1. XR device</a>
    <li><a href="#ref-for-enumdef-xrsessionmode①">3.2. XR</a> <a href="#ref-for-enumdef-xrsessionmode②">(2)</a>
    <li><a href="#ref-for-enumdef-xrsessionmode③">3.3. XRSessionMode</a>
    <li><a href="#ref-for-enumdef-xrsessionmode④">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-enumdef-xrsessionmode⑤">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsessionmode-inline">
   <b><a href="#dom-xrsessionmode-inline">#dom-xrsessionmode-inline</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsessionmode-inline">2.1. XR device</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline①">3.2. XR</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline②">3.3. XRSessionMode</a> <a href="#ref-for-dom-xrsessionmode-inline③">(2)</a> <a href="#ref-for-dom-xrsessionmode-inline④">(3)</a> <a href="#ref-for-dom-xrsessionmode-inline⑤">(4)</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline⑥">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline⑦">4.2. XRRenderState</a> <a href="#ref-for-dom-xrsessionmode-inline⑧">(2)</a> <a href="#ref-for-dom-xrsessionmode-inline⑨">(3)</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline①⓪">4.3. Animation Frames</a> <a href="#ref-for-dom-xrsessionmode-inline①①">(2)</a> <a href="#ref-for-dom-xrsessionmode-inline①②">(3)</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline①③">10.1. XRInputSource</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline①④">10.2. Transient input</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline①⑤">11.2. WebGL Context Compatibility</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline①⑥">13.1. Sensitive Information</a>
    <li><a href="#ref-for-dom-xrsessionmode-inline①⑦">13.5.1. Immersiveness</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsessionmode-immersive-vr">
   <b><a href="#dom-xrsessionmode-immersive-vr">#dom-xrsessionmode-immersive-vr</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsessionmode-immersive-vr">3.2. XR</a> <a href="#ref-for-dom-xrsessionmode-immersive-vr①">(2)</a>
    <li><a href="#ref-for-dom-xrsessionmode-immersive-vr②">3.3. XRSessionMode</a> <a href="#ref-for-dom-xrsessionmode-immersive-vr③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsessionmode-immersive-ar">
   <b><a href="#dom-xrsessionmode-immersive-ar">#dom-xrsessionmode-immersive-ar</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsessionmode-immersive-ar">3.3. XRSessionMode</a> <a href="#ref-for-dom-xrsessionmode-immersive-ar①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="inline-session">
   <b><a href="#inline-session">#inline-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-inline-session">3.4. Feature Dependencies</a> <a href="#ref-for-inline-session①">(2)</a>
    <li><a href="#ref-for-inline-session②">4.2. XRRenderState</a>
    <li><a href="#ref-for-inline-session③">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-inline-session④">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="immersive-session">
   <b><a href="#immersive-session">#immersive-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-immersive-session">3.2. XR</a>
    <li><a href="#ref-for-immersive-session①">3.3. XRSessionMode</a> <a href="#ref-for-immersive-session②">(2)</a> <a href="#ref-for-immersive-session③">(3)</a> <a href="#ref-for-immersive-session④">(4)</a> <a href="#ref-for-immersive-session⑤">(5)</a>
    <li><a href="#ref-for-immersive-session⑥">3.4. Feature Dependencies</a> <a href="#ref-for-immersive-session⑦">(2)</a> <a href="#ref-for-immersive-session⑧">(3)</a> <a href="#ref-for-immersive-session⑨">(4)</a>
    <li><a href="#ref-for-immersive-session①⓪">4.1. XRSession</a> <a href="#ref-for-immersive-session①①">(2)</a> <a href="#ref-for-immersive-session①②">(3)</a> <a href="#ref-for-immersive-session①③">(4)</a> <a href="#ref-for-immersive-session①④">(5)</a>
    <li><a href="#ref-for-immersive-session①⑤">4.2. XRRenderState</a>
    <li><a href="#ref-for-immersive-session①⑥">4.3. Animation Frames</a> <a href="#ref-for-immersive-session①⑦">(2)</a>
    <li><a href="#ref-for-immersive-session①⑧">6.2. XRReferenceSpace</a> <a href="#ref-for-immersive-session①⑨">(2)</a> <a href="#ref-for-immersive-session②⓪">(3)</a>
    <li><a href="#ref-for-immersive-session②①">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-immersive-session②②">13.1. Sensitive Information</a>
    <li><a href="#ref-for-immersive-session②③">13.5.1. Immersiveness</a> <a href="#ref-for-immersive-session②④">(2)</a>
    <li><a href="#ref-for-immersive-session②⑤">14.1. Feature Policy</a> <a href="#ref-for-immersive-session②⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="exclusive-access">
   <b><a href="#exclusive-access">#exclusive-access</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-exclusive-access">3.3. XRSessionMode</a> <a href="#ref-for-exclusive-access①">(2)</a> <a href="#ref-for-exclusive-access②">(3)</a>
    <li><a href="#ref-for-exclusive-access③">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="required-features">
   <b><a href="#required-features">#required-features</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-required-features">3.4. Feature Dependencies</a> <a href="#ref-for-required-features①">(2)</a>
    <li><a href="#ref-for-required-features②">13.5.1. Immersiveness</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="optional-features">
   <b><a href="#optional-features">#optional-features</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-optional-features">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-optional-features①">13.5.1. Immersiveness</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-xrsessioninit">
   <b><a href="#dictdef-xrsessioninit">#dictdef-xrsessioninit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-xrsessioninit">3.2. XR</a>
    <li><a href="#ref-for-dictdef-xrsessioninit①">3.4. Feature Dependencies</a> <a href="#ref-for-dictdef-xrsessioninit②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsessioninit-requiredfeatures">
   <b><a href="#dom-xrsessioninit-requiredfeatures">#dom-xrsessioninit-requiredfeatures</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsessioninit-requiredfeatures">3.2. XR</a>
    <li><a href="#ref-for-dom-xrsessioninit-requiredfeatures①">3.4. Feature Dependencies</a> <a href="#ref-for-dom-xrsessioninit-requiredfeatures②">(2)</a> <a href="#ref-for-dom-xrsessioninit-requiredfeatures③">(3)</a> <a href="#ref-for-dom-xrsessioninit-requiredfeatures④">(4)</a> <a href="#ref-for-dom-xrsessioninit-requiredfeatures⑤">(5)</a> <a href="#ref-for-dom-xrsessioninit-requiredfeatures⑥">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsessioninit-optionalfeatures">
   <b><a href="#dom-xrsessioninit-optionalfeatures">#dom-xrsessioninit-optionalfeatures</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsessioninit-optionalfeatures">3.2. XR</a>
    <li><a href="#ref-for-dom-xrsessioninit-optionalfeatures①">3.4. Feature Dependencies</a> <a href="#ref-for-dom-xrsessioninit-optionalfeatures②">(2)</a> <a href="#ref-for-dom-xrsessioninit-optionalfeatures③">(3)</a> <a href="#ref-for-dom-xrsessioninit-optionalfeatures④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="feature-descriptor">
   <b><a href="#feature-descriptor">#feature-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-feature-descriptor">3.4. Feature Dependencies</a> <a href="#ref-for-feature-descriptor①">(2)</a> <a href="#ref-for-feature-descriptor②">(3)</a> <a href="#ref-for-feature-descriptor③">(4)</a> <a href="#ref-for-feature-descriptor④">(5)</a> <a href="#ref-for-feature-descriptor⑤">(6)</a> <a href="#ref-for-feature-descriptor⑥">(7)</a> <a href="#ref-for-feature-descriptor⑦">(8)</a> <a href="#ref-for-feature-descriptor⑧">(9)</a> <a href="#ref-for-feature-descriptor⑨">(10)</a>
    <li><a href="#ref-for-feature-descriptor①⓪">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="default-features">
   <b><a href="#default-features">#default-features</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-default-features">3.4. Feature Dependencies</a> <a href="#ref-for-default-features①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="requested-features">
   <b><a href="#requested-features">#requested-features</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-requested-features">3.4. Feature Dependencies</a> <a href="#ref-for-requested-features①">(2)</a> <a href="#ref-for-requested-features②">(3)</a>
    <li><a href="#ref-for-requested-features③">13.5.1. Immersiveness</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="feature-requirements">
   <b><a href="#feature-requirements">#feature-requirements</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-feature-requirements">3.4. Feature Dependencies</a> <a href="#ref-for-feature-requirements①">(2)</a>
    <li><a href="#ref-for-feature-requirements②">13.5.3. Reference spaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="capable-of-supporting">
   <b><a href="#capable-of-supporting">#capable-of-supporting</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-capable-of-supporting">3.4. Feature Dependencies</a> <a href="#ref-for-capable-of-supporting①">(2)</a> <a href="#ref-for-capable-of-supporting②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="resolve-the-requested-features">
   <b><a href="#resolve-the-requested-features">#resolve-the-requested-features</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-resolve-the-requested-features">3.2. XR</a>
    <li><a href="#ref-for-resolve-the-requested-features①">3.4. Feature Dependencies</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="should-not-initialize-device-tracking">
   <b><a href="#should-not-initialize-device-tracking">#should-not-initialize-device-tracking</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-should-not-initialize-device-tracking">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-xrvisibilitystate">
   <b><a href="#enumdef-xrvisibilitystate">#enumdef-xrvisibilitystate</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-xrvisibilitystate">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession">
   <b><a href="#xrsession">#xrsession</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession">1.2. Application flow</a> <a href="#ref-for-xrsession①">(2)</a>
    <li><a href="#ref-for-xrsession②">3.2. XR</a> <a href="#ref-for-xrsession③">(2)</a> <a href="#ref-for-xrsession④">(3)</a> <a href="#ref-for-xrsession⑤">(4)</a> <a href="#ref-for-xrsession⑥">(5)</a> <a href="#ref-for-xrsession⑦">(6)</a> <a href="#ref-for-xrsession⑧">(7)</a>
    <li><a href="#ref-for-xrsession⑨">3.3. XRSessionMode</a>
    <li><a href="#ref-for-xrsession①⓪">3.4. Feature Dependencies</a> <a href="#ref-for-xrsession①①">(2)</a> <a href="#ref-for-xrsession①②">(3)</a> <a href="#ref-for-xrsession①③">(4)</a> <a href="#ref-for-xrsession①④">(5)</a> <a href="#ref-for-xrsession①⑤">(6)</a> <a href="#ref-for-xrsession①⑥">(7)</a> <a href="#ref-for-xrsession①⑦">(8)</a>
    <li><a href="#ref-for-xrsession①⑧">4.1. XRSession</a> <a href="#ref-for-xrsession①⑨">(2)</a> <a href="#ref-for-xrsession②⓪">(3)</a> <a href="#ref-for-xrsession②①">(4)</a> <a href="#ref-for-xrsession②②">(5)</a> <a href="#ref-for-xrsession②③">(6)</a> <a href="#ref-for-xrsession②④">(7)</a> <a href="#ref-for-xrsession②⑤">(8)</a> <a href="#ref-for-xrsession②⑥">(9)</a> <a href="#ref-for-xrsession②⑦">(10)</a> <a href="#ref-for-xrsession②⑧">(11)</a> <a href="#ref-for-xrsession②⑨">(12)</a> <a href="#ref-for-xrsession③⓪">(13)</a> <a href="#ref-for-xrsession③①">(14)</a> <a href="#ref-for-xrsession③②">(15)</a> <a href="#ref-for-xrsession③③">(16)</a> <a href="#ref-for-xrsession③④">(17)</a> <a href="#ref-for-xrsession③⑤">(18)</a> <a href="#ref-for-xrsession③⑥">(19)</a> <a href="#ref-for-xrsession③⑦">(20)</a> <a href="#ref-for-xrsession③⑧">(21)</a> <a href="#ref-for-xrsession③⑨">(22)</a> <a href="#ref-for-xrsession④⓪">(23)</a> <a href="#ref-for-xrsession④①">(24)</a> <a href="#ref-for-xrsession④②">(25)</a> <a href="#ref-for-xrsession④③">(26)</a> <a href="#ref-for-xrsession④④">(27)</a> <a href="#ref-for-xrsession④⑤">(28)</a> <a href="#ref-for-xrsession④⑥">(29)</a> <a href="#ref-for-xrsession④⑦">(30)</a> <a href="#ref-for-xrsession④⑧">(31)</a> <a href="#ref-for-xrsession④⑨">(32)</a> <a href="#ref-for-xrsession⑤⓪">(33)</a>
    <li><a href="#ref-for-xrsession⑤①">4.2. XRRenderState</a> <a href="#ref-for-xrsession⑤②">(2)</a> <a href="#ref-for-xrsession⑤③">(3)</a> <a href="#ref-for-xrsession⑤④">(4)</a> <a href="#ref-for-xrsession⑤⑤">(5)</a> <a href="#ref-for-xrsession⑤⑥">(6)</a>
    <li><a href="#ref-for-xrsession⑤⑦">4.3. Animation Frames</a> <a href="#ref-for-xrsession⑤⑧">(2)</a> <a href="#ref-for-xrsession⑤⑨">(3)</a> <a href="#ref-for-xrsession⑥⓪">(4)</a> <a href="#ref-for-xrsession⑥①">(5)</a> <a href="#ref-for-xrsession⑥②">(6)</a> <a href="#ref-for-xrsession⑥③">(7)</a> <a href="#ref-for-xrsession⑥④">(8)</a> <a href="#ref-for-xrsession⑥⑤">(9)</a>
    <li><a href="#ref-for-xrsession⑥⑥">5.1. XRFrame</a> <a href="#ref-for-xrsession⑥⑦">(2)</a> <a href="#ref-for-xrsession⑥⑧">(3)</a> <a href="#ref-for-xrsession⑥⑨">(4)</a> <a href="#ref-for-xrsession⑦⓪">(5)</a>
    <li><a href="#ref-for-xrsession⑦①">6.1. XRSpace</a>
    <li><a href="#ref-for-xrsession⑦②">6.2. XRReferenceSpace</a> <a href="#ref-for-xrsession⑦③">(2)</a> <a href="#ref-for-xrsession⑦④">(3)</a> <a href="#ref-for-xrsession⑦⑤">(4)</a>
    <li><a href="#ref-for-xrsession⑦⑥">7.1. XRView</a>
    <li><a href="#ref-for-xrsession⑦⑦">10.1. XRInputSource</a> <a href="#ref-for-xrsession⑦⑧">(2)</a> <a href="#ref-for-xrsession⑦⑨">(3)</a> <a href="#ref-for-xrsession⑧⓪">(4)</a> <a href="#ref-for-xrsession⑧①">(5)</a> <a href="#ref-for-xrsession⑧②">(6)</a> <a href="#ref-for-xrsession⑧③">(7)</a> <a href="#ref-for-xrsession⑧④">(8)</a>
    <li><a href="#ref-for-xrsession⑧⑤">10.2. Transient input</a> <a href="#ref-for-xrsession⑧⑥">(2)</a> <a href="#ref-for-xrsession⑧⑦">(3)</a> <a href="#ref-for-xrsession⑧⑧">(4)</a>
    <li><a href="#ref-for-xrsession⑧⑨">10.3. XRInputSourceArray</a>
    <li><a href="#ref-for-xrsession⑨⓪">11.1. XRWebGLLayer</a> <a href="#ref-for-xrsession⑨①">(2)</a> <a href="#ref-for-xrsession⑨②">(3)</a> <a href="#ref-for-xrsession⑨③">(4)</a> <a href="#ref-for-xrsession⑨④">(5)</a> <a href="#ref-for-xrsession⑨⑤">(6)</a> <a href="#ref-for-xrsession⑨⑥">(7)</a> <a href="#ref-for-xrsession⑨⑦">(8)</a>
    <li><a href="#ref-for-xrsession⑨⑧">11.2. WebGL Context Compatibility</a>
    <li><a href="#ref-for-xrsession⑨⑨">12.1. XRSessionEvent</a> <a href="#ref-for-xrsession①⓪⓪">(2)</a> <a href="#ref-for-xrsession①⓪①">(3)</a> <a href="#ref-for-xrsession①⓪②">(4)</a>
    <li><a href="#ref-for-xrsession①⓪③">12.3. XRInputSourcesChangeEvent</a> <a href="#ref-for-xrsession①⓪④">(2)</a> <a href="#ref-for-xrsession①⓪⑤">(3)</a> <a href="#ref-for-xrsession①⓪⑥">(4)</a> <a href="#ref-for-xrsession①⓪⑦">(5)</a> <a href="#ref-for-xrsession①⓪⑧">(6)</a>
    <li><a href="#ref-for-xrsession①⓪⑨">12.5. Event Types</a> <a href="#ref-for-xrsession①①⓪">(2)</a> <a href="#ref-for-xrsession①①①">(3)</a> <a href="#ref-for-xrsession①①②">(4)</a> <a href="#ref-for-xrsession①①③">(5)</a> <a href="#ref-for-xrsession①①④">(6)</a> <a href="#ref-for-xrsession①①⑤">(7)</a> <a href="#ref-for-xrsession①①⑥">(8)</a> <a href="#ref-for-xrsession①①⑦">(9)</a> <a href="#ref-for-xrsession①①⑧">(10)</a>
    <li><a href="#ref-for-xrsession①①⑨">13.2.4. Duration of consent</a>
    <li><a href="#ref-for-xrsession①②⓪">13.5.2. Poses</a>
    <li><a href="#ref-for-xrsession①②①">13.6. Trusted Environment</a> <a href="#ref-for-xrsession①②②">(2)</a> <a href="#ref-for-xrsession①②③">(3)</a>
    <li><a href="#ref-for-xrsession①②④">13.7. Context Isolation</a>
    <li><a href="#ref-for-xrsession①②⑤">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-mode">
   <b><a href="#xrsession-mode">#xrsession-mode</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-mode">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-xrsession-mode①">4.1. XRSession</a> <a href="#ref-for-xrsession-mode②">(2)</a>
    <li><a href="#ref-for-xrsession-mode③">4.3. Animation Frames</a>
    <li><a href="#ref-for-xrsession-mode④">10.1. XRInputSource</a>
    <li><a href="#ref-for-xrsession-mode⑤">11.1. XRWebGLLayer</a> <a href="#ref-for-xrsession-mode⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="initialize-the-session">
   <b><a href="#initialize-the-session">#initialize-the-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-initialize-the-session">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="shut-down-the-session">
   <b><a href="#shut-down-the-session">#shut-down-the-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-shut-down-the-session">1.2. Application flow</a>
    <li><a href="#ref-for-shut-down-the-session①">3.2. XR</a>
    <li><a href="#ref-for-shut-down-the-session②">4.1. XRSession</a>
    <li><a href="#ref-for-shut-down-the-session③">13.3. Mid-session consent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="ended">
   <b><a href="#ended">#ended</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-ended">4.1. XRSession</a> <a href="#ref-for-ended①">(2)</a>
    <li><a href="#ref-for-ended②">11.1. XRWebGLLayer</a> <a href="#ref-for-ended③">(2)</a>
    <li><a href="#ref-for-ended④">13.2.4. Duration of consent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-end">
   <b><a href="#dom-xrsession-end">#dom-xrsession-end</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-end">4.1. XRSession</a> <a href="#ref-for-dom-xrsession-end①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-list-of-enabled-features">
   <b><a href="#xrsession-list-of-enabled-features">#xrsession-list-of-enabled-features</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-list-of-enabled-features">3.4. Feature Dependencies</a> <a href="#ref-for-xrsession-list-of-enabled-features①">(2)</a> <a href="#ref-for-xrsession-list-of-enabled-features②">(3)</a> <a href="#ref-for-xrsession-list-of-enabled-features③">(4)</a>
    <li><a href="#ref-for-xrsession-list-of-enabled-features④">6.2. XRReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="active-render-state">
   <b><a href="#active-render-state">#active-render-state</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-active-render-state">4.1. XRSession</a> <a href="#ref-for-active-render-state①">(2)</a> <a href="#ref-for-active-render-state②">(3)</a> <a href="#ref-for-active-render-state③">(4)</a>
    <li><a href="#ref-for-active-render-state④">4.2. XRRenderState</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="pending-render-state">
   <b><a href="#pending-render-state">#pending-render-state</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-pending-render-state">4.1. XRSession</a> <a href="#ref-for-pending-render-state①">(2)</a> <a href="#ref-for-pending-render-state②">(3)</a> <a href="#ref-for-pending-render-state③">(4)</a> <a href="#ref-for-pending-render-state④">(5)</a> <a href="#ref-for-pending-render-state⑤">(6)</a> <a href="#ref-for-pending-render-state⑥">(7)</a>
    <li><a href="#ref-for-pending-render-state⑦">4.3. Animation Frames</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-renderstate">
   <b><a href="#dom-xrsession-renderstate">#dom-xrsession-renderstate</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-renderstate">4.1. XRSession</a> <a href="#ref-for-dom-xrsession-renderstate①">(2)</a>
    <li><a href="#ref-for-dom-xrsession-renderstate②">4.3. Animation Frames</a> <a href="#ref-for-dom-xrsession-renderstate③">(2)</a>
    <li><a href="#ref-for-dom-xrsession-renderstate④">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="minimum-inline-field-of-view">
   <b><a href="#minimum-inline-field-of-view">#minimum-inline-field-of-view</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-minimum-inline-field-of-view">4.1. XRSession</a> <a href="#ref-for-minimum-inline-field-of-view①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="maximum-inline-field-of-view">
   <b><a href="#maximum-inline-field-of-view">#maximum-inline-field-of-view</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-maximum-inline-field-of-view">4.1. XRSession</a> <a href="#ref-for-maximum-inline-field-of-view①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="minimum-near-clip-plane">
   <b><a href="#minimum-near-clip-plane">#minimum-near-clip-plane</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-minimum-near-clip-plane">4.1. XRSession</a> <a href="#ref-for-minimum-near-clip-plane①">(2)</a> <a href="#ref-for-minimum-near-clip-plane②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="maximum-far-clip-plane">
   <b><a href="#maximum-far-clip-plane">#maximum-far-clip-plane</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-maximum-far-clip-plane">4.1. XRSession</a> <a href="#ref-for-maximum-far-clip-plane①">(2)</a> <a href="#ref-for-maximum-far-clip-plane②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-updaterenderstate">
   <b><a href="#dom-xrsession-updaterenderstate">#dom-xrsession-updaterenderstate</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-updaterenderstate">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrsession-updaterenderstate①">4.2. XRRenderState</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="apply-the-pending-render-state">
   <b><a href="#apply-the-pending-render-state">#apply-the-pending-render-state</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-apply-the-pending-render-state">4.3. Animation Frames</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-requestreferencespace">
   <b><a href="#dom-xrsession-requestreferencespace">#dom-xrsession-requestreferencespace</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-requestreferencespace">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrsession-requestreferencespace①">6.2. XRReferenceSpace</a> <a href="#ref-for-dom-xrsession-requestreferencespace②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="list-of-active-xr-input-sources">
   <b><a href="#list-of-active-xr-input-sources">#list-of-active-xr-input-sources</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-of-active-xr-input-sources">4.1. XRSession</a> <a href="#ref-for-list-of-active-xr-input-sources①">(2)</a> <a href="#ref-for-list-of-active-xr-input-sources②">(3)</a> <a href="#ref-for-list-of-active-xr-input-sources③">(4)</a> <a href="#ref-for-list-of-active-xr-input-sources④">(5)</a> <a href="#ref-for-list-of-active-xr-input-sources⑤">(6)</a> <a href="#ref-for-list-of-active-xr-input-sources⑥">(7)</a>
    <li><a href="#ref-for-list-of-active-xr-input-sources⑦">10.2. Transient input</a> <a href="#ref-for-list-of-active-xr-input-sources⑧">(2)</a> <a href="#ref-for-list-of-active-xr-input-sources⑨">(3)</a> <a href="#ref-for-list-of-active-xr-input-sources①⓪">(4)</a>
    <li><a href="#ref-for-list-of-active-xr-input-sources①①">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-xr-device">
   <b><a href="#xrsession-xr-device">#xrsession-xr-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-xr-device">1.2. Application flow</a>
    <li><a href="#ref-for-xrsession-xr-device①">3.4. Feature Dependencies</a> <a href="#ref-for-xrsession-xr-device②">(2)</a> <a href="#ref-for-xrsession-xr-device③">(3)</a> <a href="#ref-for-xrsession-xr-device④">(4)</a> <a href="#ref-for-xrsession-xr-device⑤">(5)</a> <a href="#ref-for-xrsession-xr-device⑥">(6)</a> <a href="#ref-for-xrsession-xr-device⑦">(7)</a>
    <li><a href="#ref-for-xrsession-xr-device⑧">4.1. XRSession</a> <a href="#ref-for-xrsession-xr-device⑨">(2)</a> <a href="#ref-for-xrsession-xr-device①⓪">(3)</a> <a href="#ref-for-xrsession-xr-device①①">(4)</a> <a href="#ref-for-xrsession-xr-device①②">(5)</a> <a href="#ref-for-xrsession-xr-device①③">(6)</a> <a href="#ref-for-xrsession-xr-device①④">(7)</a> <a href="#ref-for-xrsession-xr-device①⑤">(8)</a>
    <li><a href="#ref-for-xrsession-xr-device①⑥">4.3. Animation Frames</a> <a href="#ref-for-xrsession-xr-device①⑦">(2)</a>
    <li><a href="#ref-for-xrsession-xr-device①⑧">4.4. The XR Compositor</a>
    <li><a href="#ref-for-xrsession-xr-device①⑨">6.1. XRSpace</a>
    <li><a href="#ref-for-xrsession-xr-device②⓪">6.2. XRReferenceSpace</a> <a href="#ref-for-xrsession-xr-device②①">(2)</a> <a href="#ref-for-xrsession-xr-device②②">(3)</a>
    <li><a href="#ref-for-xrsession-xr-device②③">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-xrsession-xr-device②④">(2)</a>
    <li><a href="#ref-for-xrsession-xr-device②⑤">9.2. XRViewerPose</a> <a href="#ref-for-xrsession-xr-device②⑥">(2)</a>
    <li><a href="#ref-for-xrsession-xr-device②⑦">10.1. XRInputSource</a>
    <li><a href="#ref-for-xrsession-xr-device②⑧">11.1. XRWebGLLayer</a> <a href="#ref-for-xrsession-xr-device②⑨">(2)</a> <a href="#ref-for-xrsession-xr-device③⓪">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-inputsources">
   <b><a href="#dom-xrsession-inputsources">#dom-xrsession-inputsources</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-inputsources">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrsession-inputsources①">10.1. XRInputSource</a>
    <li><a href="#ref-for-dom-xrsession-inputsources②">10.3. XRInputSourceArray</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-add-input-source">
   <b><a href="#xrsession-add-input-source">#xrsession-add-input-source</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-add-input-source">10.2. Transient input</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-remove-input-source">
   <b><a href="#xrsession-remove-input-source">#xrsession-remove-input-source</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-remove-input-source">10.2. Transient input</a> <a href="#ref-for-xrsession-remove-input-source①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-visibility-state">
   <b><a href="#xrsession-visibility-state">#xrsession-visibility-state</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-visibility-state">4.1. XRSession</a> <a href="#ref-for-xrsession-visibility-state①">(2)</a> <a href="#ref-for-xrsession-visibility-state②">(3)</a> <a href="#ref-for-xrsession-visibility-state③">(4)</a> <a href="#ref-for-xrsession-visibility-state④">(5)</a>
    <li><a href="#ref-for-xrsession-visibility-state⑤">12.5. Event Types</a>
    <li><a href="#ref-for-xrsession-visibility-state⑥">13.6. Trusted Environment</a> <a href="#ref-for-xrsession-visibility-state⑦">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrvisibilitystate-visible">
   <b><a href="#dom-xrvisibilitystate-visible">#dom-xrvisibilitystate-visible</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrvisibilitystate-visible">3.3. XRSessionMode</a>
    <li><a href="#ref-for-dom-xrvisibilitystate-visible①">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrvisibilitystate-visible②">13.5.2. Poses</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrvisibilitystate-visible-blurred">
   <b><a href="#dom-xrvisibilitystate-visible-blurred">#dom-xrvisibilitystate-visible-blurred</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrvisibilitystate-visible-blurred">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrvisibilitystate-hidden">
   <b><a href="#dom-xrvisibilitystate-hidden">#dom-xrvisibilitystate-hidden</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrvisibilitystate-hidden">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrvisibilitystate-hidden①">13.6. Trusted Environment</a> <a href="#ref-for-dom-xrvisibilitystate-hidden②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-visibilitystate">
   <b><a href="#dom-xrsession-visibilitystate">#dom-xrsession-visibilitystate</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-visibilitystate">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrsession-visibilitystate①">13.5.2. Poses</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-onvisibilitychange">
   <b><a href="#dom-xrsession-onvisibilitychange">#dom-xrsession-onvisibilitychange</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-onvisibilitychange">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-viewer-reference-space">
   <b><a href="#xrsession-viewer-reference-space">#xrsession-viewer-reference-space</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-viewer-reference-space">4.1. XRSession</a>
    <li><a href="#ref-for-xrsession-viewer-reference-space①">5.1. XRFrame</a> <a href="#ref-for-xrsession-viewer-reference-space②">(2)</a>
    <li><a href="#ref-for-xrsession-viewer-reference-space③">7.1. XRView</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-viewer-reference-space-list-of-views">
   <b><a href="#xrsession-viewer-reference-space-list-of-views">#xrsession-viewer-reference-space-list-of-views</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-viewer-reference-space-list-of-views">4.1. XRSession</a>
    <li><a href="#ref-for-xrsession-viewer-reference-space-list-of-views①">5.1. XRFrame</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-onend">
   <b><a href="#dom-xrsession-onend">#dom-xrsession-onend</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-onend">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-oninputsourceschange">
   <b><a href="#dom-xrsession-oninputsourceschange">#dom-xrsession-oninputsourceschange</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-oninputsourceschange">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-onselectstart">
   <b><a href="#dom-xrsession-onselectstart">#dom-xrsession-onselectstart</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-onselectstart">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-onselectend">
   <b><a href="#dom-xrsession-onselectend">#dom-xrsession-onselectend</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-onselectend">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-onselect">
   <b><a href="#dom-xrsession-onselect">#dom-xrsession-onselect</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-onselect">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-onsqueezestart">
   <b><a href="#dom-xrsession-onsqueezestart">#dom-xrsession-onsqueezestart</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-onsqueezestart">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-onsqueezeend">
   <b><a href="#dom-xrsession-onsqueezeend">#dom-xrsession-onsqueezeend</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-onsqueezeend">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-onsqueeze">
   <b><a href="#dom-xrsession-onsqueeze">#dom-xrsession-onsqueeze</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-onsqueeze">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-xrrenderstateinit">
   <b><a href="#dictdef-xrrenderstateinit">#dictdef-xrrenderstateinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-xrrenderstateinit">4.1. XRSession</a> <a href="#ref-for-dictdef-xrrenderstateinit①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrenderstateinit-depthnear">
   <b><a href="#dom-xrrenderstateinit-depthnear">#dom-xrrenderstateinit-depthnear</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrenderstateinit-depthnear">4.1. XRSession</a> <a href="#ref-for-dom-xrrenderstateinit-depthnear①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrenderstateinit-depthfar">
   <b><a href="#dom-xrrenderstateinit-depthfar">#dom-xrrenderstateinit-depthfar</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrenderstateinit-depthfar">4.1. XRSession</a> <a href="#ref-for-dom-xrrenderstateinit-depthfar①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrenderstateinit-inlineverticalfieldofview">
   <b><a href="#dom-xrrenderstateinit-inlineverticalfieldofview">#dom-xrrenderstateinit-inlineverticalfieldofview</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrenderstateinit-inlineverticalfieldofview">4.1. XRSession</a> <a href="#ref-for-dom-xrrenderstateinit-inlineverticalfieldofview①">(2)</a> <a href="#ref-for-dom-xrrenderstateinit-inlineverticalfieldofview②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrenderstateinit-baselayer">
   <b><a href="#dom-xrrenderstateinit-baselayer">#dom-xrrenderstateinit-baselayer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrenderstateinit-baselayer">4.1. XRSession</a> <a href="#ref-for-dom-xrrenderstateinit-baselayer①">(2)</a> <a href="#ref-for-dom-xrrenderstateinit-baselayer②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrrenderstate">
   <b><a href="#xrrenderstate">#xrrenderstate</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrrenderstate">4.1. XRSession</a> <a href="#ref-for-xrrenderstate①">(2)</a> <a href="#ref-for-xrrenderstate②">(3)</a>
    <li><a href="#ref-for-xrrenderstate③">4.2. XRRenderState</a> <a href="#ref-for-xrrenderstate④">(2)</a> <a href="#ref-for-xrrenderstate⑤">(3)</a> <a href="#ref-for-xrrenderstate⑥">(4)</a> <a href="#ref-for-xrrenderstate⑦">(5)</a> <a href="#ref-for-xrrenderstate⑧">(6)</a> <a href="#ref-for-xrrenderstate⑨">(7)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrrenderstate-output-canvas">
   <b><a href="#xrrenderstate-output-canvas">#xrrenderstate-output-canvas</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrrenderstate-output-canvas">4.1. XRSession</a> <a href="#ref-for-xrrenderstate-output-canvas①">(2)</a> <a href="#ref-for-xrrenderstate-output-canvas②">(3)</a>
    <li><a href="#ref-for-xrrenderstate-output-canvas③">4.2. XRRenderState</a> <a href="#ref-for-xrrenderstate-output-canvas④">(2)</a> <a href="#ref-for-xrrenderstate-output-canvas⑤">(3)</a> <a href="#ref-for-xrrenderstate-output-canvas⑥">(4)</a> <a href="#ref-for-xrrenderstate-output-canvas⑦">(5)</a>
    <li><a href="#ref-for-xrrenderstate-output-canvas⑧">4.3. Animation Frames</a>
    <li><a href="#ref-for-xrrenderstate-output-canvas⑨">11.1. XRWebGLLayer</a> <a href="#ref-for-xrrenderstate-output-canvas①⓪">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrrenderstate-composition-disabled">
   <b><a href="#xrrenderstate-composition-disabled">#xrrenderstate-composition-disabled</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrrenderstate-composition-disabled">4.1. XRSession</a> <a href="#ref-for-xrrenderstate-composition-disabled①">(2)</a> <a href="#ref-for-xrrenderstate-composition-disabled②">(3)</a> <a href="#ref-for-xrrenderstate-composition-disabled③">(4)</a>
    <li><a href="#ref-for-xrrenderstate-composition-disabled④">4.2. XRRenderState</a> <a href="#ref-for-xrrenderstate-composition-disabled⑤">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="initialize-the-render-state">
   <b><a href="#initialize-the-render-state">#initialize-the-render-state</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-initialize-the-render-state">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrenderstate-depthnear">
   <b><a href="#dom-xrrenderstate-depthnear">#dom-xrrenderstate-depthnear</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrenderstate-depthnear">4.1. XRSession</a> <a href="#ref-for-dom-xrrenderstate-depthnear①">(2)</a> <a href="#ref-for-dom-xrrenderstate-depthnear②">(3)</a>
    <li><a href="#ref-for-dom-xrrenderstate-depthnear③">4.2. XRRenderState</a> <a href="#ref-for-dom-xrrenderstate-depthnear④">(2)</a> <a href="#ref-for-dom-xrrenderstate-depthnear⑤">(3)</a> <a href="#ref-for-dom-xrrenderstate-depthnear⑥">(4)</a> <a href="#ref-for-dom-xrrenderstate-depthnear⑦">(5)</a>
    <li><a href="#ref-for-dom-xrrenderstate-depthnear⑧">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrenderstate-depthfar">
   <b><a href="#dom-xrrenderstate-depthfar">#dom-xrrenderstate-depthfar</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrenderstate-depthfar">4.1. XRSession</a> <a href="#ref-for-dom-xrrenderstate-depthfar①">(2)</a> <a href="#ref-for-dom-xrrenderstate-depthfar②">(3)</a>
    <li><a href="#ref-for-dom-xrrenderstate-depthfar③">4.2. XRRenderState</a> <a href="#ref-for-dom-xrrenderstate-depthfar④">(2)</a> <a href="#ref-for-dom-xrrenderstate-depthfar⑤">(3)</a> <a href="#ref-for-dom-xrrenderstate-depthfar⑥">(4)</a> <a href="#ref-for-dom-xrrenderstate-depthfar⑦">(5)</a>
    <li><a href="#ref-for-dom-xrrenderstate-depthfar⑧">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrenderstate-inlineverticalfieldofview">
   <b><a href="#dom-xrrenderstate-inlineverticalfieldofview">#dom-xrrenderstate-inlineverticalfieldofview</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview">4.1. XRSession</a> <a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview①">(2)</a> <a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview②">(3)</a> <a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview③">(4)</a> <a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview④">(5)</a>
    <li><a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview⑤">4.2. XRRenderState</a> <a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview⑥">(2)</a> <a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview⑦">(3)</a> <a href="#ref-for-dom-xrrenderstate-inlineverticalfieldofview⑧">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrenderstate-baselayer">
   <b><a href="#dom-xrrenderstate-baselayer">#dom-xrrenderstate-baselayer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrenderstate-baselayer">4.1. XRSession</a> <a href="#ref-for-dom-xrrenderstate-baselayer①">(2)</a>
    <li><a href="#ref-for-dom-xrrenderstate-baselayer②">4.2. XRRenderState</a> <a href="#ref-for-dom-xrrenderstate-baselayer③">(2)</a>
    <li><a href="#ref-for-dom-xrrenderstate-baselayer④">4.3. Animation Frames</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="callbackdef-xrframerequestcallback">
   <b><a href="#callbackdef-xrframerequestcallback">#callbackdef-xrframerequestcallback</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-callbackdef-xrframerequestcallback">4.1. XRSession</a>
    <li><a href="#ref-for-callbackdef-xrframerequestcallback①">4.3. Animation Frames</a>
    <li><a href="#ref-for-callbackdef-xrframerequestcallback②">5.1. XRFrame</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrframerequestcallback-cancelled">
   <b><a href="#xrframerequestcallback-cancelled">#xrframerequestcallback-cancelled</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrframerequestcallback-cancelled">4.3. Animation Frames</a> <a href="#ref-for-xrframerequestcallback-cancelled①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="list-of-animation-frame-callbacks">
   <b><a href="#list-of-animation-frame-callbacks">#list-of-animation-frame-callbacks</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-of-animation-frame-callbacks">4.3. Animation Frames</a> <a href="#ref-for-list-of-animation-frame-callbacks①">(2)</a> <a href="#ref-for-list-of-animation-frame-callbacks②">(3)</a> <a href="#ref-for-list-of-animation-frame-callbacks③">(4)</a> <a href="#ref-for-list-of-animation-frame-callbacks④">(5)</a> <a href="#ref-for-list-of-animation-frame-callbacks⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="animation-frame-callback-identifier">
   <b><a href="#animation-frame-callback-identifier">#animation-frame-callback-identifier</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-animation-frame-callback-identifier">4.3. Animation Frames</a> <a href="#ref-for-animation-frame-callback-identifier①">(2)</a> <a href="#ref-for-animation-frame-callback-identifier②">(3)</a> <a href="#ref-for-animation-frame-callback-identifier③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-requestanimationframe">
   <b><a href="#dom-xrsession-requestanimationframe">#dom-xrsession-requestanimationframe</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-requestanimationframe">4.1. XRSession</a> <a href="#ref-for-dom-xrsession-requestanimationframe①">(2)</a> <a href="#ref-for-dom-xrsession-requestanimationframe②">(3)</a> <a href="#ref-for-dom-xrsession-requestanimationframe③">(4)</a>
    <li><a href="#ref-for-dom-xrsession-requestanimationframe④">4.3. Animation Frames</a> <a href="#ref-for-dom-xrsession-requestanimationframe⑤">(2)</a> <a href="#ref-for-dom-xrsession-requestanimationframe⑥">(3)</a>
    <li><a href="#ref-for-dom-xrsession-requestanimationframe⑦">5.1. XRFrame</a>
    <li><a href="#ref-for-dom-xrsession-requestanimationframe⑧">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrsession-requestanimationframe⑨">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsession-cancelanimationframe">
   <b><a href="#dom-xrsession-cancelanimationframe">#dom-xrsession-cancelanimationframe</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsession-cancelanimationframe">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xr-animation-frame">
   <b><a href="#xr-animation-frame">#xr-animation-frame</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xr-animation-frame">4.1. XRSession</a>
    <li><a href="#ref-for-xr-animation-frame①">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-xr-animation-frame②">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xr-compositor">
   <b><a href="#xr-compositor">#xr-compositor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xr-compositor">4.2. XRRenderState</a> <a href="#ref-for-xr-compositor①">(2)</a>
    <li><a href="#ref-for-xr-compositor②">11.1. XRWebGLLayer</a> <a href="#ref-for-xr-compositor③">(2)</a> <a href="#ref-for-xr-compositor④">(3)</a> <a href="#ref-for-xr-compositor⑤">(4)</a>
    <li><a href="#ref-for-xr-compositor⑥">13.6. Trusted Environment</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrframe">
   <b><a href="#xrframe">#xrframe</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrframe">4.3. Animation Frames</a> <a href="#ref-for-xrframe①">(2)</a>
    <li><a href="#ref-for-xrframe②">5.1. XRFrame</a> <a href="#ref-for-xrframe③">(2)</a> <a href="#ref-for-xrframe④">(3)</a> <a href="#ref-for-xrframe⑤">(4)</a> <a href="#ref-for-xrframe⑥">(5)</a> <a href="#ref-for-xrframe⑦">(6)</a> <a href="#ref-for-xrframe⑧">(7)</a> <a href="#ref-for-xrframe⑨">(8)</a> <a href="#ref-for-xrframe①⓪">(9)</a> <a href="#ref-for-xrframe①①">(10)</a> <a href="#ref-for-xrframe①②">(11)</a> <a href="#ref-for-xrframe①③">(12)</a> <a href="#ref-for-xrframe①④">(13)</a> <a href="#ref-for-xrframe①⑤">(14)</a>
    <li><a href="#ref-for-xrframe①⑥">6.1. XRSpace</a> <a href="#ref-for-xrframe①⑦">(2)</a> <a href="#ref-for-xrframe①⑧">(3)</a> <a href="#ref-for-xrframe①⑨">(4)</a>
    <li><a href="#ref-for-xrframe②⓪">7.1. XRView</a>
    <li><a href="#ref-for-xrframe②①">10.1. XRInputSource</a> <a href="#ref-for-xrframe②②">(2)</a> <a href="#ref-for-xrframe②③">(3)</a> <a href="#ref-for-xrframe②④">(4)</a> <a href="#ref-for-xrframe②⑤">(5)</a> <a href="#ref-for-xrframe②⑥">(6)</a>
    <li><a href="#ref-for-xrframe②⑦">10.2. Transient input</a> <a href="#ref-for-xrframe②⑧">(2)</a> <a href="#ref-for-xrframe②⑨">(3)</a>
    <li><a href="#ref-for-xrframe③⓪">12.2. XRInputSourceEvent</a> <a href="#ref-for-xrframe③①">(2)</a> <a href="#ref-for-xrframe③②">(3)</a> <a href="#ref-for-xrframe③③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrframe-active">
   <b><a href="#xrframe-active">#xrframe-active</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrframe-active">4.3. Animation Frames</a> <a href="#ref-for-xrframe-active①">(2)</a>
    <li><a href="#ref-for-xrframe-active②">6.1. XRSpace</a>
    <li><a href="#ref-for-xrframe-active③">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-xrframe-active④">12.2. XRInputSourceEvent</a> <a href="#ref-for-xrframe-active⑤">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrframe-animationframe">
   <b><a href="#xrframe-animationframe">#xrframe-animationframe</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrframe-animationframe">4.3. Animation Frames</a>
    <li><a href="#ref-for-xrframe-animationframe①">5.1. XRFrame</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrframe-session">
   <b><a href="#dom-xrframe-session">#dom-xrframe-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrframe-session">4.3. Animation Frames</a>
    <li><a href="#ref-for-dom-xrframe-session①">5.1. XRFrame</a> <a href="#ref-for-dom-xrframe-session②">(2)</a> <a href="#ref-for-dom-xrframe-session③">(3)</a> <a href="#ref-for-dom-xrframe-session④">(4)</a>
    <li><a href="#ref-for-dom-xrframe-session⑤">6.1. XRSpace</a>
    <li><a href="#ref-for-dom-xrframe-session⑥">10.1. XRInputSource</a> <a href="#ref-for-dom-xrframe-session⑦">(2)</a> <a href="#ref-for-dom-xrframe-session⑧">(3)</a> <a href="#ref-for-dom-xrframe-session⑨">(4)</a> <a href="#ref-for-dom-xrframe-session①⓪">(5)</a> <a href="#ref-for-dom-xrframe-session①①">(6)</a>
    <li><a href="#ref-for-dom-xrframe-session①②">10.2. Transient input</a> <a href="#ref-for-dom-xrframe-session①③">(2)</a> <a href="#ref-for-dom-xrframe-session①④">(3)</a>
    <li><a href="#ref-for-dom-xrframe-session①⑤">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-dom-xrframe-session①⑥">12.2. XRInputSourceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrframe-time">
   <b><a href="#xrframe-time">#xrframe-time</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrframe-time">4.3. Animation Frames</a>
    <li><a href="#ref-for-xrframe-time①">5.1. XRFrame</a> <a href="#ref-for-xrframe-time②">(2)</a>
    <li><a href="#ref-for-xrframe-time③">6.1. XRSpace</a>
    <li><a href="#ref-for-xrframe-time④">10.1. XRInputSource</a> <a href="#ref-for-xrframe-time⑤">(2)</a> <a href="#ref-for-xrframe-time⑥">(3)</a> <a href="#ref-for-xrframe-time⑦">(4)</a> <a href="#ref-for-xrframe-time⑧">(5)</a> <a href="#ref-for-xrframe-time⑨">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrframe-getviewerpose">
   <b><a href="#dom-xrframe-getviewerpose">#dom-xrframe-getviewerpose</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrframe-getviewerpose">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrframe-getviewerpose①">5.1. XRFrame</a>
    <li><a href="#ref-for-dom-xrframe-getviewerpose②">7.1. XRView</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrframe-getpose">
   <b><a href="#dom-xrframe-getpose">#dom-xrframe-getpose</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrframe-getpose">5.1. XRFrame</a>
    <li><a href="#ref-for-dom-xrframe-getpose①">6.1. XRSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="frame-update">
   <b><a href="#frame-update">#frame-update</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-frame-update">5.1. XRFrame</a> <a href="#ref-for-frame-update①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-list-of-frame-updates">
   <b><a href="#xrsession-list-of-frame-updates">#xrsession-list-of-frame-updates</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-list-of-frame-updates">5.1. XRFrame</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrframe-apply-frame-updates">
   <b><a href="#xrframe-apply-frame-updates">#xrframe-apply-frame-updates</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrframe-apply-frame-updates">4.3. Animation Frames</a>
    <li><a href="#ref-for-xrframe-apply-frame-updates①">12.2. XRInputSourceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrspace">
   <b><a href="#xrspace">#xrspace</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrspace">5.1. XRFrame</a> <a href="#ref-for-xrspace①">(2)</a>
    <li><a href="#ref-for-xrspace②">6.1. XRSpace</a> <a href="#ref-for-xrspace③">(2)</a> <a href="#ref-for-xrspace④">(3)</a> <a href="#ref-for-xrspace⑤">(4)</a> <a href="#ref-for-xrspace⑥">(5)</a> <a href="#ref-for-xrspace⑦">(6)</a> <a href="#ref-for-xrspace⑧">(7)</a> <a href="#ref-for-xrspace⑨">(8)</a> <a href="#ref-for-xrspace①⓪">(9)</a> <a href="#ref-for-xrspace①①">(10)</a> <a href="#ref-for-xrspace①②">(11)</a>
    <li><a href="#ref-for-xrspace①③">6.2. XRReferenceSpace</a> <a href="#ref-for-xrspace①④">(2)</a>
    <li><a href="#ref-for-xrspace①⑤">9.1. XRPose</a> <a href="#ref-for-xrspace①⑥">(2)</a>
    <li><a href="#ref-for-xrspace①⑦">10.1. XRInputSource</a> <a href="#ref-for-xrspace①⑧">(2)</a> <a href="#ref-for-xrspace①⑨">(3)</a> <a href="#ref-for-xrspace②⓪">(4)</a> <a href="#ref-for-xrspace②①">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrspace-session">
   <b><a href="#xrspace-session">#xrspace-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrspace-session">6.1. XRSpace</a> <a href="#ref-for-xrspace-session①">(2)</a>
    <li><a href="#ref-for-xrspace-session②">6.2. XRReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrspace-native-origin">
   <b><a href="#xrspace-native-origin">#xrspace-native-origin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrspace-native-origin">6.1. XRSpace</a>
    <li><a href="#ref-for-xrspace-native-origin①">6.2. XRReferenceSpace</a> <a href="#ref-for-xrspace-native-origin②">(2)</a> <a href="#ref-for-xrspace-native-origin③">(3)</a> <a href="#ref-for-xrspace-native-origin④">(4)</a> <a href="#ref-for-xrspace-native-origin⑤">(5)</a> <a href="#ref-for-xrspace-native-origin⑥">(6)</a> <a href="#ref-for-xrspace-native-origin⑦">(7)</a> <a href="#ref-for-xrspace-native-origin⑧">(8)</a> <a href="#ref-for-xrspace-native-origin⑨">(9)</a>
    <li><a href="#ref-for-xrspace-native-origin①⓪">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-xrspace-native-origin①①">(2)</a> <a href="#ref-for-xrspace-native-origin①②">(3)</a>
    <li><a href="#ref-for-xrspace-native-origin①③">10.1. XRInputSource</a> <a href="#ref-for-xrspace-native-origin①④">(2)</a> <a href="#ref-for-xrspace-native-origin①⑤">(3)</a>
    <li><a href="#ref-for-xrspace-native-origin①⑥">12.4. XRReferenceSpaceEvent</a>
    <li><a href="#ref-for-xrspace-native-origin①⑦">12.5. Event Types</a> <a href="#ref-for-xrspace-native-origin①⑧">(2)</a>
    <li><a href="#ref-for-xrspace-native-origin①⑨">13.5.3. Reference spaces</a> <a href="#ref-for-xrspace-native-origin②⓪">(2)</a> <a href="#ref-for-xrspace-native-origin②①">(3)</a> <a href="#ref-for-xrspace-native-origin②②">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrspace-effective-origin">
   <b><a href="#xrspace-effective-origin">#xrspace-effective-origin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrspace-effective-origin">6.1. XRSpace</a> <a href="#ref-for-xrspace-effective-origin①">(2)</a> <a href="#ref-for-xrspace-effective-origin②">(3)</a> <a href="#ref-for-xrspace-effective-origin③">(4)</a> <a href="#ref-for-xrspace-effective-origin④">(5)</a> <a href="#ref-for-xrspace-effective-origin⑤">(6)</a> <a href="#ref-for-xrspace-effective-origin⑥">(7)</a>
    <li><a href="#ref-for-xrspace-effective-origin⑦">6.3. XRBoundedReferenceSpace</a>
    <li><a href="#ref-for-xrspace-effective-origin⑧">12.5. Event Types</a> <a href="#ref-for-xrspace-effective-origin⑨">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrspace-coordinate-system">
   <b><a href="#xrspace-coordinate-system">#xrspace-coordinate-system</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrspace-coordinate-system">6.1. XRSpace</a> <a href="#ref-for-xrspace-coordinate-system①">(2)</a> <a href="#ref-for-xrspace-coordinate-system②">(3)</a> <a href="#ref-for-xrspace-coordinate-system③">(4)</a> <a href="#ref-for-xrspace-coordinate-system④">(5)</a> <a href="#ref-for-xrspace-coordinate-system⑤">(6)</a>
    <li><a href="#ref-for-xrspace-coordinate-system⑥">7.1. XRView</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrspace-origin-offset">
   <b><a href="#xrspace-origin-offset">#xrspace-origin-offset</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrspace-origin-offset">4.1. XRSession</a>
    <li><a href="#ref-for-xrspace-origin-offset①">6.2. XRReferenceSpace</a> <a href="#ref-for-xrspace-origin-offset②">(2)</a>
    <li><a href="#ref-for-xrspace-origin-offset③">6.3. XRBoundedReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="populate-the-pose">
   <b><a href="#populate-the-pose">#populate-the-pose</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-populate-the-pose">5.1. XRFrame</a> <a href="#ref-for-populate-the-pose①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-xrreferencespacetype">
   <b><a href="#enumdef-xrreferencespacetype">#enumdef-xrreferencespacetype</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-xrreferencespacetype">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-enumdef-xrreferencespacetype①">4.1. XRSession</a> <a href="#ref-for-enumdef-xrreferencespacetype②">(2)</a>
    <li><a href="#ref-for-enumdef-xrreferencespacetype③">6.2. XRReferenceSpace</a> <a href="#ref-for-enumdef-xrreferencespacetype④">(2)</a> <a href="#ref-for-enumdef-xrreferencespacetype⑤">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrreferencespace">
   <b><a href="#xrreferencespace">#xrreferencespace</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrreferencespace">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-xrreferencespace①">4.1. XRSession</a> <a href="#ref-for-xrreferencespace②">(2)</a> <a href="#ref-for-xrreferencespace③">(3)</a>
    <li><a href="#ref-for-xrreferencespace④">5.1. XRFrame</a>
    <li><a href="#ref-for-xrreferencespace⑤">6.1. XRSpace</a>
    <li><a href="#ref-for-xrreferencespace⑥">6.2. XRReferenceSpace</a> <a href="#ref-for-xrreferencespace⑦">(2)</a> <a href="#ref-for-xrreferencespace⑧">(3)</a> <a href="#ref-for-xrreferencespace⑨">(4)</a> <a href="#ref-for-xrreferencespace①⓪">(5)</a> <a href="#ref-for-xrreferencespace①①">(6)</a> <a href="#ref-for-xrreferencespace①②">(7)</a> <a href="#ref-for-xrreferencespace①③">(8)</a> <a href="#ref-for-xrreferencespace①④">(9)</a> <a href="#ref-for-xrreferencespace①⑤">(10)</a> <a href="#ref-for-xrreferencespace①⑥">(11)</a> <a href="#ref-for-xrreferencespace①⑦">(12)</a> <a href="#ref-for-xrreferencespace①⑧">(13)</a> <a href="#ref-for-xrreferencespace①⑨">(14)</a> <a href="#ref-for-xrreferencespace②⓪">(15)</a> <a href="#ref-for-xrreferencespace②①">(16)</a> <a href="#ref-for-xrreferencespace②②">(17)</a>
    <li><a href="#ref-for-xrreferencespace②③">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-xrreferencespace②④">(2)</a>
    <li><a href="#ref-for-xrreferencespace②⑤">7.1. XRView</a>
    <li><a href="#ref-for-xrreferencespace②⑥">9.2. XRViewerPose</a> <a href="#ref-for-xrreferencespace②⑦">(2)</a>
    <li><a href="#ref-for-xrreferencespace②⑧">12.4. XRReferenceSpaceEvent</a> <a href="#ref-for-xrreferencespace②⑨">(2)</a> <a href="#ref-for-xrreferencespace③⓪">(3)</a> <a href="#ref-for-xrreferencespace③①">(4)</a>
    <li><a href="#ref-for-xrreferencespace③②">12.5. Event Types</a> <a href="#ref-for-xrreferencespace③③">(2)</a> <a href="#ref-for-xrreferencespace③④">(3)</a>
    <li><a href="#ref-for-xrreferencespace③⑤">13.5.3. Reference spaces</a> <a href="#ref-for-xrreferencespace③⑥">(2)</a>
    <li><a href="#ref-for-xrreferencespace③⑦">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrreferencespace-type">
   <b><a href="#xrreferencespace-type">#xrreferencespace-type</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrreferencespace-type">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-xrreferencespace-type①">13.5.3. Reference spaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespacetype-viewer">
   <b><a href="#dom-xrreferencespacetype-viewer">#dom-xrreferencespacetype-viewer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespacetype-viewer">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-viewer①">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-viewer②">6.2. XRReferenceSpace</a> <a href="#ref-for-dom-xrreferencespacetype-viewer③">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-viewer④">(3)</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-viewer⑤">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespacetype-local">
   <b><a href="#dom-xrreferencespacetype-local">#dom-xrreferencespacetype-local</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespacetype-local">3.4. Feature Dependencies</a> <a href="#ref-for-dom-xrreferencespacetype-local①">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-local②">(3)</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-local③">6.2. XRReferenceSpace</a> <a href="#ref-for-dom-xrreferencespacetype-local④">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-local⑤">(3)</a> <a href="#ref-for-dom-xrreferencespacetype-local⑥">(4)</a> <a href="#ref-for-dom-xrreferencespacetype-local⑦">(5)</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-local⑧">13.5.3. Reference spaces</a> <a href="#ref-for-dom-xrreferencespacetype-local⑨">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-local①⓪">(3)</a> <a href="#ref-for-dom-xrreferencespacetype-local①①">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespacetype-local-floor">
   <b><a href="#dom-xrreferencespacetype-local-floor">#dom-xrreferencespacetype-local-floor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespacetype-local-floor">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-local-floor①">6.2. XRReferenceSpace</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor②">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor③">(3)</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor④">(4)</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor⑤">(5)</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor⑥">(6)</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-local-floor⑦">13.5.3. Reference spaces</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor⑧">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor⑨">(3)</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor①⓪">(4)</a> <a href="#ref-for-dom-xrreferencespacetype-local-floor①①">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="estimated-floor-level">
   <b><a href="#estimated-floor-level">#estimated-floor-level</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-estimated-floor-level">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-estimated-floor-level①">9.1. XRPose</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespacetype-bounded-floor">
   <b><a href="#dom-xrreferencespacetype-bounded-floor">#dom-xrreferencespacetype-bounded-floor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespacetype-bounded-floor">3.4. Feature Dependencies</a> <a href="#ref-for-dom-xrreferencespacetype-bounded-floor①">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-bounded-floor②">(3)</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-bounded-floor③">6.2. XRReferenceSpace</a> <a href="#ref-for-dom-xrreferencespacetype-bounded-floor④">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-bounded-floor⑤">(3)</a> <a href="#ref-for-dom-xrreferencespacetype-bounded-floor⑥">(4)</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-bounded-floor⑦">6.3. XRBoundedReferenceSpace</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-bounded-floor⑧">13.5.3. Reference spaces</a> <a href="#ref-for-dom-xrreferencespacetype-bounded-floor⑨">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespacetype-unbounded">
   <b><a href="#dom-xrreferencespacetype-unbounded">#dom-xrreferencespacetype-unbounded</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespacetype-unbounded">3.4. Feature Dependencies</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-unbounded①">6.2. XRReferenceSpace</a> <a href="#ref-for-dom-xrreferencespacetype-unbounded②">(2)</a> <a href="#ref-for-dom-xrreferencespacetype-unbounded③">(3)</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-unbounded④">6.3. XRBoundedReferenceSpace</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-unbounded⑤">12.5. Event Types</a>
    <li><a href="#ref-for-dom-xrreferencespacetype-unbounded⑥">13.5.3. Reference spaces</a> <a href="#ref-for-dom-xrreferencespacetype-unbounded⑦">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespace-onreset">
   <b><a href="#dom-xrreferencespace-onreset">#dom-xrreferencespace-onreset</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespace-onreset">6.2. XRReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="create-a-reference-space">
   <b><a href="#create-a-reference-space">#create-a-reference-space</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-create-a-reference-space">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="reference-space-is-supported">
   <b><a href="#reference-space-is-supported">#reference-space-is-supported</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-reference-space-is-supported">6.2. XRReferenceSpace</a> <a href="#ref-for-reference-space-is-supported①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespace-getoffsetreferencespace">
   <b><a href="#dom-xrreferencespace-getoffsetreferencespace">#dom-xrreferencespace-getoffsetreferencespace</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespace-getoffsetreferencespace">6.2. XRReferenceSpace</a> <a href="#ref-for-dom-xrreferencespace-getoffsetreferencespace①">(2)</a> <a href="#ref-for-dom-xrreferencespace-getoffsetreferencespace②">(3)</a> <a href="#ref-for-dom-xrreferencespace-getoffsetreferencespace③">(4)</a>
    <li><a href="#ref-for-dom-xrreferencespace-getoffsetreferencespace④">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrboundedreferencespace">
   <b><a href="#xrboundedreferencespace">#xrboundedreferencespace</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrboundedreferencespace">6.2. XRReferenceSpace</a> <a href="#ref-for-xrboundedreferencespace①">(2)</a> <a href="#ref-for-xrboundedreferencespace②">(3)</a> <a href="#ref-for-xrboundedreferencespace③">(4)</a>
    <li><a href="#ref-for-xrboundedreferencespace④">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-xrboundedreferencespace⑤">(2)</a> <a href="#ref-for-xrboundedreferencespace⑥">(3)</a> <a href="#ref-for-xrboundedreferencespace⑦">(4)</a> <a href="#ref-for-xrboundedreferencespace⑧">(5)</a> <a href="#ref-for-xrboundedreferencespace⑨">(6)</a> <a href="#ref-for-xrboundedreferencespace①⓪">(7)</a>
    <li><a href="#ref-for-xrboundedreferencespace①①">12.5. Event Types</a>
    <li><a href="#ref-for-xrboundedreferencespace①②">13.5.3. Reference spaces</a> <a href="#ref-for-xrboundedreferencespace①③">(2)</a> <a href="#ref-for-xrboundedreferencespace①④">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrboundedreferencespace-native-bounds-geometry">
   <b><a href="#xrboundedreferencespace-native-bounds-geometry">#xrboundedreferencespace-native-bounds-geometry</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrboundedreferencespace-native-bounds-geometry">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-xrboundedreferencespace-native-bounds-geometry①">(2)</a> <a href="#ref-for-xrboundedreferencespace-native-bounds-geometry②">(3)</a> <a href="#ref-for-xrboundedreferencespace-native-bounds-geometry③">(4)</a> <a href="#ref-for-xrboundedreferencespace-native-bounds-geometry④">(5)</a>
    <li><a href="#ref-for-xrboundedreferencespace-native-bounds-geometry⑤">13.5.3. Reference spaces</a> <a href="#ref-for-xrboundedreferencespace-native-bounds-geometry⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrboundedreferencespace-boundsgeometry">
   <b><a href="#dom-xrboundedreferencespace-boundsgeometry">#dom-xrboundedreferencespace-boundsgeometry</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry">6.2. XRReferenceSpace</a> <a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry①">(2)</a> <a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry②">(3)</a> <a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry③">(4)</a>
    <li><a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry④">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry⑤">(2)</a> <a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry⑥">(3)</a> <a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry⑦">(4)</a>
    <li><a href="#ref-for-dom-xrboundedreferencespace-boundsgeometry⑧">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="bounded-reference-spaces-are-supported">
   <b><a href="#bounded-reference-spaces-are-supported">#bounded-reference-spaces-are-supported</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-bounded-reference-spaces-are-supported">6.2. XRReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="view">
   <b><a href="#view">#view</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-view">2.1. XR device</a>
    <li><a href="#ref-for-view①">3.3. XRSessionMode</a>
    <li><a href="#ref-for-view②">4.1. XRSession</a> <a href="#ref-for-view③">(2)</a>
    <li><a href="#ref-for-view④">5.1. XRFrame</a>
    <li><a href="#ref-for-view⑤">7.1. XRView</a> <a href="#ref-for-view⑥">(2)</a> <a href="#ref-for-view⑦">(3)</a> <a href="#ref-for-view⑧">(4)</a> <a href="#ref-for-view⑨">(5)</a> <a href="#ref-for-view①⓪">(6)</a> <a href="#ref-for-view①①">(7)</a> <a href="#ref-for-view①②">(8)</a> <a href="#ref-for-view①③">(9)</a> <a href="#ref-for-view①④">(10)</a> <a href="#ref-for-view①⑤">(11)</a> <a href="#ref-for-view①⑥">(12)</a> <a href="#ref-for-view①⑦">(13)</a> <a href="#ref-for-view①⑧">(14)</a> <a href="#ref-for-view①⑨">(15)</a>
    <li><a href="#ref-for-view②⓪">9.2. XRViewerPose</a> <a href="#ref-for-view②①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="view-offset">
   <b><a href="#view-offset">#view-offset</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-view-offset">5.1. XRFrame</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="view-projection-matrix">
   <b><a href="#view-projection-matrix">#view-projection-matrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-view-projection-matrix">7.1. XRView</a> <a href="#ref-for-view-projection-matrix①">(2)</a> <a href="#ref-for-view-projection-matrix②">(3)</a> <a href="#ref-for-view-projection-matrix③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="view-eye">
   <b><a href="#view-eye">#view-eye</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-view-eye">5.1. XRFrame</a>
    <li><a href="#ref-for-view-eye①">7.1. XRView</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-xreye">
   <b><a href="#enumdef-xreye">#enumdef-xreye</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-xreye">7.1. XRView</a> <a href="#ref-for-enumdef-xreye①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xreye-none">
   <b><a href="#dom-xreye-none">#dom-xreye-none</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xreye-none">7.1. XRView</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrview">
   <b><a href="#xrview">#xrview</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrview">4.2. XRRenderState</a>
    <li><a href="#ref-for-xrview①">5.1. XRFrame</a>
    <li><a href="#ref-for-xrview②">7.1. XRView</a> <a href="#ref-for-xrview③">(2)</a> <a href="#ref-for-xrview④">(3)</a> <a href="#ref-for-xrview⑤">(4)</a> <a href="#ref-for-xrview⑥">(5)</a> <a href="#ref-for-xrview⑦">(6)</a>
    <li><a href="#ref-for-xrview⑧">7.2. XRViewport</a>
    <li><a href="#ref-for-xrview⑨">9.2. XRViewerPose</a> <a href="#ref-for-xrview①⓪">(2)</a> <a href="#ref-for-xrview①①">(3)</a>
    <li><a href="#ref-for-xrview①②">11.1. XRWebGLLayer</a> <a href="#ref-for-xrview①③">(2)</a> <a href="#ref-for-xrview①④">(3)</a> <a href="#ref-for-xrview①⑤">(4)</a> <a href="#ref-for-xrview①⑥">(5)</a>
    <li><a href="#ref-for-xrview①⑦">13.5.2. Poses</a> <a href="#ref-for-xrview①⑧">(2)</a> <a href="#ref-for-xrview①⑨">(3)</a> <a href="#ref-for-xrview②⓪">(4)</a> <a href="#ref-for-xrview②①">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrview-eye">
   <b><a href="#dom-xrview-eye">#dom-xrview-eye</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrview-eye">5.1. XRFrame</a>
    <li><a href="#ref-for-dom-xrview-eye①">7.1. XRView</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrview-projectionmatrix">
   <b><a href="#dom-xrview-projectionmatrix">#dom-xrview-projectionmatrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrview-projectionmatrix">4.2. XRRenderState</a> <a href="#ref-for-dom-xrview-projectionmatrix①">(2)</a>
    <li><a href="#ref-for-dom-xrview-projectionmatrix②">7.1. XRView</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrview-transform">
   <b><a href="#dom-xrview-transform">#dom-xrview-transform</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrview-transform">5.1. XRFrame</a>
    <li><a href="#ref-for-dom-xrview-transform①">7.1. XRView</a> <a href="#ref-for-dom-xrview-transform②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrview-frame">
   <b><a href="#xrview-frame">#xrview-frame</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrview-frame">5.1. XRFrame</a>
    <li><a href="#ref-for-xrview-frame①">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrview-underlying-view">
   <b><a href="#xrview-underlying-view">#xrview-underlying-view</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrview-underlying-view">5.1. XRFrame</a>
    <li><a href="#ref-for-xrview-underlying-view①">7.1. XRView</a> <a href="#ref-for-xrview-underlying-view②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrview-internal-projection-matrix">
   <b><a href="#xrview-internal-projection-matrix">#xrview-internal-projection-matrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrview-internal-projection-matrix">7.1. XRView</a> <a href="#ref-for-xrview-internal-projection-matrix①">(2)</a> <a href="#ref-for-xrview-internal-projection-matrix②">(3)</a> <a href="#ref-for-xrview-internal-projection-matrix③">(4)</a> <a href="#ref-for-xrview-internal-projection-matrix④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrview-obtain-the-projection-matrix">
   <b><a href="#xrview-obtain-the-projection-matrix">#xrview-obtain-the-projection-matrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrview-obtain-the-projection-matrix">7.1. XRView</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrviewport">
   <b><a href="#xrviewport">#xrviewport</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrviewport">7.2. XRViewport</a> <a href="#ref-for-xrviewport①">(2)</a>
    <li><a href="#ref-for-xrviewport②">9.2. XRViewerPose</a>
    <li><a href="#ref-for-xrviewport③">11.1. XRWebGLLayer</a> <a href="#ref-for-xrviewport④">(2)</a> <a href="#ref-for-xrviewport⑤">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrviewport-x">
   <b><a href="#dom-xrviewport-x">#dom-xrviewport-x</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrviewport-x">7.2. XRViewport</a> <a href="#ref-for-dom-xrviewport-x①">(2)</a> <a href="#ref-for-dom-xrviewport-x②">(3)</a>
    <li><a href="#ref-for-dom-xrviewport-x③">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrviewport-y">
   <b><a href="#dom-xrviewport-y">#dom-xrviewport-y</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrviewport-y">7.2. XRViewport</a> <a href="#ref-for-dom-xrviewport-y①">(2)</a> <a href="#ref-for-dom-xrviewport-y②">(3)</a>
    <li><a href="#ref-for-dom-xrviewport-y③">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrviewport-width">
   <b><a href="#dom-xrviewport-width">#dom-xrviewport-width</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrviewport-width">7.2. XRViewport</a> <a href="#ref-for-dom-xrviewport-width①">(2)</a>
    <li><a href="#ref-for-dom-xrviewport-width②">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrviewport-height">
   <b><a href="#dom-xrviewport-height">#dom-xrviewport-height</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrviewport-height">7.2. XRViewport</a> <a href="#ref-for-dom-xrviewport-height①">(2)</a>
    <li><a href="#ref-for-dom-xrviewport-height②">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="matrix">
   <b><a href="#matrix">#matrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-matrix">7.1. XRView</a> <a href="#ref-for-matrix①">(2)</a>
    <li><a href="#ref-for-matrix②">8.3. XRRigidTransform</a> <a href="#ref-for-matrix③">(2)</a> <a href="#ref-for-matrix④">(3)</a> <a href="#ref-for-matrix⑤">(4)</a> <a href="#ref-for-matrix⑥">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="normalize">
   <b><a href="#normalize">#normalize</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-normalize">8.3. XRRigidTransform</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrrigidtransform-internal-matrix">
   <b><a href="#xrrigidtransform-internal-matrix">#xrrigidtransform-internal-matrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrrigidtransform-internal-matrix">8.3. XRRigidTransform</a> <a href="#ref-for-xrrigidtransform-internal-matrix①">(2)</a> <a href="#ref-for-xrrigidtransform-internal-matrix②">(3)</a> <a href="#ref-for-xrrigidtransform-internal-matrix③">(4)</a> <a href="#ref-for-xrrigidtransform-internal-matrix④">(5)</a> <a href="#ref-for-xrrigidtransform-internal-matrix⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrrigidtransform">
   <b><a href="#xrrigidtransform">#xrrigidtransform</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrrigidtransform">5.1. XRFrame</a>
    <li><a href="#ref-for-xrrigidtransform①">6.1. XRSpace</a>
    <li><a href="#ref-for-xrrigidtransform②">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-xrrigidtransform③">7.1. XRView</a> <a href="#ref-for-xrrigidtransform④">(2)</a> <a href="#ref-for-xrrigidtransform⑤">(3)</a>
    <li><a href="#ref-for-xrrigidtransform⑥">8.3. XRRigidTransform</a> <a href="#ref-for-xrrigidtransform⑦">(2)</a> <a href="#ref-for-xrrigidtransform⑧">(3)</a> <a href="#ref-for-xrrigidtransform⑨">(4)</a> <a href="#ref-for-xrrigidtransform①⓪">(5)</a> <a href="#ref-for-xrrigidtransform①①">(6)</a> <a href="#ref-for-xrrigidtransform①②">(7)</a> <a href="#ref-for-xrrigidtransform①③">(8)</a> <a href="#ref-for-xrrigidtransform①④">(9)</a> <a href="#ref-for-xrrigidtransform①⑤">(10)</a> <a href="#ref-for-xrrigidtransform①⑥">(11)</a> <a href="#ref-for-xrrigidtransform①⑦">(12)</a> <a href="#ref-for-xrrigidtransform①⑧">(13)</a> <a href="#ref-for-xrrigidtransform①⑨">(14)</a> <a href="#ref-for-xrrigidtransform②⓪">(15)</a>
    <li><a href="#ref-for-xrrigidtransform②①">9.1. XRPose</a>
    <li><a href="#ref-for-xrrigidtransform②②">12.4. XRReferenceSpaceEvent</a> <a href="#ref-for-xrrigidtransform②③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrigidtransform-xrrigidtransform">
   <b><a href="#dom-xrrigidtransform-xrrigidtransform">#dom-xrrigidtransform-xrrigidtransform</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrigidtransform-xrrigidtransform">8.3. XRRigidTransform</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrigidtransform-position">
   <b><a href="#dom-xrrigidtransform-position">#dom-xrrigidtransform-position</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrigidtransform-position">6.1. XRSpace</a> <a href="#ref-for-dom-xrrigidtransform-position①">(2)</a> <a href="#ref-for-dom-xrrigidtransform-position②">(3)</a>
    <li><a href="#ref-for-dom-xrrigidtransform-position③">8.3. XRRigidTransform</a> <a href="#ref-for-dom-xrrigidtransform-position④">(2)</a> <a href="#ref-for-dom-xrrigidtransform-position⑤">(3)</a> <a href="#ref-for-dom-xrrigidtransform-position⑥">(4)</a> <a href="#ref-for-dom-xrrigidtransform-position⑦">(5)</a> <a href="#ref-for-dom-xrrigidtransform-position⑧">(6)</a> <a href="#ref-for-dom-xrrigidtransform-position⑨">(7)</a> <a href="#ref-for-dom-xrrigidtransform-position①⓪">(8)</a> <a href="#ref-for-dom-xrrigidtransform-position①①">(9)</a> <a href="#ref-for-dom-xrrigidtransform-position①②">(10)</a> <a href="#ref-for-dom-xrrigidtransform-position①③">(11)</a> <a href="#ref-for-dom-xrrigidtransform-position①④">(12)</a> <a href="#ref-for-dom-xrrigidtransform-position①⑤">(13)</a> <a href="#ref-for-dom-xrrigidtransform-position①⑥">(14)</a> <a href="#ref-for-dom-xrrigidtransform-position①⑦">(15)</a> <a href="#ref-for-dom-xrrigidtransform-position①⑧">(16)</a>
    <li><a href="#ref-for-dom-xrrigidtransform-position①⑨">9.1. XRPose</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrigidtransform-orientation">
   <b><a href="#dom-xrrigidtransform-orientation">#dom-xrrigidtransform-orientation</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrigidtransform-orientation">6.1. XRSpace</a> <a href="#ref-for-dom-xrrigidtransform-orientation①">(2)</a> <a href="#ref-for-dom-xrrigidtransform-orientation②">(3)</a>
    <li><a href="#ref-for-dom-xrrigidtransform-orientation③">8.3. XRRigidTransform</a> <a href="#ref-for-dom-xrrigidtransform-orientation④">(2)</a> <a href="#ref-for-dom-xrrigidtransform-orientation⑤">(3)</a> <a href="#ref-for-dom-xrrigidtransform-orientation⑥">(4)</a> <a href="#ref-for-dom-xrrigidtransform-orientation⑦">(5)</a> <a href="#ref-for-dom-xrrigidtransform-orientation⑧">(6)</a> <a href="#ref-for-dom-xrrigidtransform-orientation⑨">(7)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①⓪">(8)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①①">(9)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①②">(10)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①③">(11)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①④">(12)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①⑤">(13)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①⑥">(14)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①⑦">(15)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①⑧">(16)</a> <a href="#ref-for-dom-xrrigidtransform-orientation①⑨">(17)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrigidtransform-matrix">
   <b><a href="#dom-xrrigidtransform-matrix">#dom-xrrigidtransform-matrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrigidtransform-matrix">8.3. XRRigidTransform</a> <a href="#ref-for-dom-xrrigidtransform-matrix①">(2)</a> <a href="#ref-for-dom-xrrigidtransform-matrix②">(3)</a> <a href="#ref-for-dom-xrrigidtransform-matrix③">(4)</a> <a href="#ref-for-dom-xrrigidtransform-matrix④">(5)</a> <a href="#ref-for-dom-xrrigidtransform-matrix⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrrigidtransform-obtain-the-matrix">
   <b><a href="#xrrigidtransform-obtain-the-matrix">#xrrigidtransform-obtain-the-matrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrrigidtransform-obtain-the-matrix">8.3. XRRigidTransform</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrrigidtransform-inverse">
   <b><a href="#dom-xrrigidtransform-inverse">#dom-xrrigidtransform-inverse</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrrigidtransform-inverse">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-dom-xrrigidtransform-inverse①">6.3. XRBoundedReferenceSpace</a>
    <li><a href="#ref-for-dom-xrrigidtransform-inverse②">8.3. XRRigidTransform</a> <a href="#ref-for-dom-xrrigidtransform-inverse③">(2)</a> <a href="#ref-for-dom-xrrigidtransform-inverse④">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="identity-transform">
   <b><a href="#identity-transform">#identity-transform</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-identity-transform">4.1. XRSession</a>
    <li><a href="#ref-for-identity-transform①">6.1. XRSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="multiply-transforms">
   <b><a href="#multiply-transforms">#multiply-transforms</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-multiply-transforms">5.1. XRFrame</a>
    <li><a href="#ref-for-multiply-transforms①">6.2. XRReferenceSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrpose">
   <b><a href="#xrpose">#xrpose</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrpose">5.1. XRFrame</a> <a href="#ref-for-xrpose①">(2)</a> <a href="#ref-for-xrpose②">(3)</a>
    <li><a href="#ref-for-xrpose③">6.1. XRSpace</a> <a href="#ref-for-xrpose④">(2)</a> <a href="#ref-for-xrpose⑤">(3)</a>
    <li><a href="#ref-for-xrpose⑥">9.1. XRPose</a> <a href="#ref-for-xrpose⑦">(2)</a>
    <li><a href="#ref-for-xrpose⑧">9.2. XRViewerPose</a> <a href="#ref-for-xrpose⑨">(2)</a> <a href="#ref-for-xrpose①⓪">(3)</a>
    <li><a href="#ref-for-xrpose①①">13.1. Sensitive Information</a>
    <li><a href="#ref-for-xrpose①②">13.5.2. Poses</a> <a href="#ref-for-xrpose①③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrpose-transform">
   <b><a href="#dom-xrpose-transform">#dom-xrpose-transform</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrpose-transform">5.1. XRFrame</a>
    <li><a href="#ref-for-dom-xrpose-transform①">6.1. XRSpace</a>
    <li><a href="#ref-for-dom-xrpose-transform②">9.1. XRPose</a> <a href="#ref-for-dom-xrpose-transform③">(2)</a>
    <li><a href="#ref-for-dom-xrpose-transform④">9.2. XRViewerPose</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrpose-emulatedposition">
   <b><a href="#dom-xrpose-emulatedposition">#dom-xrpose-emulatedposition</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrpose-emulatedposition">6.1. XRSpace</a> <a href="#ref-for-dom-xrpose-emulatedposition①">(2)</a> <a href="#ref-for-dom-xrpose-emulatedposition②">(3)</a> <a href="#ref-for-dom-xrpose-emulatedposition③">(4)</a> <a href="#ref-for-dom-xrpose-emulatedposition④">(5)</a> <a href="#ref-for-dom-xrpose-emulatedposition⑤">(6)</a>
    <li><a href="#ref-for-dom-xrpose-emulatedposition⑥">9.1. XRPose</a>
    <li><a href="#ref-for-dom-xrpose-emulatedposition⑦">12.5. Event Types</a> <a href="#ref-for-dom-xrpose-emulatedposition⑧">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrpose-computed-offset">
   <b><a href="#xrpose-computed-offset">#xrpose-computed-offset</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrpose-computed-offset">9.1. XRPose</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="viewer">
   <b><a href="#viewer">#viewer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-viewer">3.3. XRSessionMode</a> <a href="#ref-for-viewer①">(2)</a>
    <li><a href="#ref-for-viewer②">4.2. XRRenderState</a> <a href="#ref-for-viewer③">(2)</a> <a href="#ref-for-viewer④">(3)</a>
    <li><a href="#ref-for-viewer⑤">4.3. Animation Frames</a>
    <li><a href="#ref-for-viewer⑥">5.1. XRFrame</a>
    <li><a href="#ref-for-viewer⑦">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-viewer⑧">9.2. XRViewerPose</a> <a href="#ref-for-viewer⑨">(2)</a>
    <li><a href="#ref-for-viewer①⓪">10.1. XRInputSource</a> <a href="#ref-for-viewer①①">(2)</a>
    <li><a href="#ref-for-viewer①②">12.5. Event Types</a> <a href="#ref-for-viewer①③">(2)</a> <a href="#ref-for-viewer①④">(3)</a> <a href="#ref-for-viewer①⑤">(4)</a> <a href="#ref-for-viewer①⑥">(5)</a> <a href="#ref-for-viewer①⑦">(6)</a> <a href="#ref-for-viewer①⑧">(7)</a> <a href="#ref-for-viewer①⑨">(8)</a> <a href="#ref-for-viewer②⓪">(9)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrviewerpose">
   <b><a href="#xrviewerpose">#xrviewerpose</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrviewerpose">5.1. XRFrame</a> <a href="#ref-for-xrviewerpose①">(2)</a> <a href="#ref-for-xrviewerpose②">(3)</a> <a href="#ref-for-xrviewerpose③">(4)</a>
    <li><a href="#ref-for-xrviewerpose④">7.2. XRViewport</a>
    <li><a href="#ref-for-xrviewerpose⑤">9.2. XRViewerPose</a> <a href="#ref-for-xrviewerpose⑥">(2)</a> <a href="#ref-for-xrviewerpose⑦">(3)</a> <a href="#ref-for-xrviewerpose⑧">(4)</a>
    <li><a href="#ref-for-xrviewerpose⑨">12.2. XRInputSourceEvent</a>
    <li><a href="#ref-for-xrviewerpose①⓪">13.5.2. Poses</a> <a href="#ref-for-xrviewerpose①①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrviewerpose-views">
   <b><a href="#dom-xrviewerpose-views">#dom-xrviewerpose-views</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrviewerpose-views">5.1. XRFrame</a>
    <li><a href="#ref-for-dom-xrviewerpose-views①">9.2. XRViewerPose</a>
    <li><a href="#ref-for-dom-xrviewerpose-views②">12.2. XRInputSourceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xr-input-source">
   <b><a href="#xr-input-source">#xr-input-source</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xr-input-source">4.1. XRSession</a> <a href="#ref-for-xr-input-source①">(2)</a> <a href="#ref-for-xr-input-source②">(3)</a> <a href="#ref-for-xr-input-source③">(4)</a> <a href="#ref-for-xr-input-source④">(5)</a> <a href="#ref-for-xr-input-source⑤">(6)</a> <a href="#ref-for-xr-input-source⑥">(7)</a> <a href="#ref-for-xr-input-source⑦">(8)</a> <a href="#ref-for-xr-input-source⑧">(9)</a> <a href="#ref-for-xr-input-source⑨">(10)</a>
    <li><a href="#ref-for-xr-input-source①⓪">10.1. XRInputSource</a> <a href="#ref-for-xr-input-source①①">(2)</a> <a href="#ref-for-xr-input-source①②">(3)</a> <a href="#ref-for-xr-input-source①③">(4)</a> <a href="#ref-for-xr-input-source①④">(5)</a> <a href="#ref-for-xr-input-source①⑤">(6)</a> <a href="#ref-for-xr-input-source①⑥">(7)</a> <a href="#ref-for-xr-input-source①⑦">(8)</a> <a href="#ref-for-xr-input-source①⑧">(9)</a> <a href="#ref-for-xr-input-source①⑨">(10)</a> <a href="#ref-for-xr-input-source②⓪">(11)</a> <a href="#ref-for-xr-input-source②①">(12)</a> <a href="#ref-for-xr-input-source②②">(13)</a>
    <li><a href="#ref-for-xr-input-source②③">10.2. Transient input</a> <a href="#ref-for-xr-input-source②④">(2)</a> <a href="#ref-for-xr-input-source②⑤">(3)</a> <a href="#ref-for-xr-input-source②⑥">(4)</a> <a href="#ref-for-xr-input-source②⑦">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-xrhandedness">
   <b><a href="#enumdef-xrhandedness">#enumdef-xrhandedness</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-xrhandedness">10.1. XRInputSource</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrhandedness-none">
   <b><a href="#dom-xrhandedness-none">#dom-xrhandedness-none</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrhandedness-none">10.1. XRInputSource</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-xrtargetraymode">
   <b><a href="#enumdef-xrtargetraymode">#enumdef-xrtargetraymode</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-xrtargetraymode">10.1. XRInputSource</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrinputsource">
   <b><a href="#xrinputsource">#xrinputsource</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrinputsource">4.1. XRSession</a> <a href="#ref-for-xrinputsource①">(2)</a> <a href="#ref-for-xrinputsource②">(3)</a> <a href="#ref-for-xrinputsource③">(4)</a> <a href="#ref-for-xrinputsource④">(5)</a> <a href="#ref-for-xrinputsource⑤">(6)</a> <a href="#ref-for-xrinputsource⑥">(7)</a>
    <li><a href="#ref-for-xrinputsource⑦">10.1. XRInputSource</a> <a href="#ref-for-xrinputsource⑧">(2)</a> <a href="#ref-for-xrinputsource⑨">(3)</a> <a href="#ref-for-xrinputsource①⓪">(4)</a> <a href="#ref-for-xrinputsource①①">(5)</a>
    <li><a href="#ref-for-xrinputsource①②">10.2. Transient input</a>
    <li><a href="#ref-for-xrinputsource①③">10.3. XRInputSourceArray</a> <a href="#ref-for-xrinputsource①④">(2)</a> <a href="#ref-for-xrinputsource①⑤">(3)</a> <a href="#ref-for-xrinputsource①⑥">(4)</a> <a href="#ref-for-xrinputsource①⑦">(5)</a>
    <li><a href="#ref-for-xrinputsource①⑧">12.2. XRInputSourceEvent</a> <a href="#ref-for-xrinputsource①⑨">(2)</a> <a href="#ref-for-xrinputsource②⓪">(3)</a> <a href="#ref-for-xrinputsource②①">(4)</a> <a href="#ref-for-xrinputsource②②">(5)</a>
    <li><a href="#ref-for-xrinputsource②③">12.3. XRInputSourcesChangeEvent</a> <a href="#ref-for-xrinputsource②④">(2)</a> <a href="#ref-for-xrinputsource②⑤">(3)</a> <a href="#ref-for-xrinputsource②⑥">(4)</a> <a href="#ref-for-xrinputsource②⑦">(5)</a> <a href="#ref-for-xrinputsource②⑧">(6)</a> <a href="#ref-for-xrinputsource②⑨">(7)</a>
    <li><a href="#ref-for-xrinputsource③⓪">12.5. Event Types</a> <a href="#ref-for-xrinputsource③①">(2)</a> <a href="#ref-for-xrinputsource③②">(3)</a> <a href="#ref-for-xrinputsource③③">(4)</a> <a href="#ref-for-xrinputsource③④">(5)</a> <a href="#ref-for-xrinputsource③⑤">(6)</a> <a href="#ref-for-xrinputsource③⑥">(7)</a> <a href="#ref-for-xrinputsource③⑦">(8)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsource-handedness">
   <b><a href="#dom-xrinputsource-handedness">#dom-xrinputsource-handedness</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsource-handedness">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrinputsource-handedness①">10.1. XRInputSource</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsource-targetraymode">
   <b><a href="#dom-xrinputsource-targetraymode">#dom-xrinputsource-targetraymode</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsource-targetraymode">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrinputsource-targetraymode①">10.1. XRInputSource</a> <a href="#ref-for-dom-xrinputsource-targetraymode②">(2)</a> <a href="#ref-for-dom-xrinputsource-targetraymode③">(3)</a>
    <li><a href="#ref-for-dom-xrinputsource-targetraymode④">10.2. Transient input</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrtargetraymode-gaze">
   <b><a href="#dom-xrtargetraymode-gaze">#dom-xrtargetraymode-gaze</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrtargetraymode-gaze">10.1. XRInputSource</a> <a href="#ref-for-dom-xrtargetraymode-gaze①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrtargetraymode-tracked-pointer">
   <b><a href="#dom-xrtargetraymode-tracked-pointer">#dom-xrtargetraymode-tracked-pointer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrtargetraymode-tracked-pointer">10.1. XRInputSource</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrtargetraymode-screen">
   <b><a href="#dom-xrtargetraymode-screen">#dom-xrtargetraymode-screen</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrtargetraymode-screen">10.1. XRInputSource</a> <a href="#ref-for-dom-xrtargetraymode-screen①">(2)</a>
    <li><a href="#ref-for-dom-xrtargetraymode-screen②">10.2. Transient input</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsource-targetrayspace">
   <b><a href="#dom-xrinputsource-targetrayspace">#dom-xrinputsource-targetrayspace</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsource-targetrayspace">6.1. XRSpace</a> <a href="#ref-for-dom-xrinputsource-targetrayspace①">(2)</a>
    <li><a href="#ref-for-dom-xrinputsource-targetrayspace②">10.1. XRInputSource</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsource-gripspace">
   <b><a href="#dom-xrinputsource-gripspace">#dom-xrinputsource-gripspace</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsource-gripspace">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrinputsource-gripspace①">6.1. XRSpace</a> <a href="#ref-for-dom-xrinputsource-gripspace②">(2)</a>
    <li><a href="#ref-for-dom-xrinputsource-gripspace③">10.1. XRInputSource</a> <a href="#ref-for-dom-xrinputsource-gripspace④">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsource-profiles">
   <b><a href="#dom-xrinputsource-profiles">#dom-xrinputsource-profiles</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsource-profiles">4.1. XRSession</a>
    <li><a href="#ref-for-dom-xrinputsource-profiles①">10.1. XRInputSource</a> <a href="#ref-for-dom-xrinputsource-profiles②">(2)</a> <a href="#ref-for-dom-xrinputsource-profiles③">(3)</a> <a href="#ref-for-dom-xrinputsource-profiles④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrinputsource-input-profile-name">
   <b><a href="#xrinputsource-input-profile-name">#xrinputsource-input-profile-name</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrinputsource-input-profile-name">10.1. XRInputSource</a> <a href="#ref-for-xrinputsource-input-profile-name①">(2)</a> <a href="#ref-for-xrinputsource-input-profile-name②">(3)</a> <a href="#ref-for-xrinputsource-input-profile-name③">(4)</a> <a href="#ref-for-xrinputsource-input-profile-name④">(5)</a> <a href="#ref-for-xrinputsource-input-profile-name⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="primary-input-source">
   <b><a href="#primary-input-source">#primary-input-source</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-primary-input-source">10.1. XRInputSource</a>
    <li><a href="#ref-for-primary-input-source①">10.2. Transient input</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="primary-action">
   <b><a href="#primary-action">#primary-action</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-primary-action">10.1. XRInputSource</a> <a href="#ref-for-primary-action①">(2)</a> <a href="#ref-for-primary-action②">(3)</a> <a href="#ref-for-primary-action③">(4)</a> <a href="#ref-for-primary-action④">(5)</a> <a href="#ref-for-primary-action⑤">(6)</a> <a href="#ref-for-primary-action⑥">(7)</a> <a href="#ref-for-primary-action⑦">(8)</a> <a href="#ref-for-primary-action⑧">(9)</a>
    <li><a href="#ref-for-primary-action⑨">10.2. Transient input</a> <a href="#ref-for-primary-action①⓪">(2)</a> <a href="#ref-for-primary-action①①">(3)</a> <a href="#ref-for-primary-action①②">(4)</a> <a href="#ref-for-primary-action①③">(5)</a> <a href="#ref-for-primary-action①④">(6)</a> <a href="#ref-for-primary-action①⑤">(7)</a>
    <li><a href="#ref-for-primary-action①⑥">12.5. Event Types</a> <a href="#ref-for-primary-action①⑦">(2)</a> <a href="#ref-for-primary-action①⑧">(3)</a> <a href="#ref-for-primary-action①⑨">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="auxiliary-input-source">
   <b><a href="#auxiliary-input-source">#auxiliary-input-source</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-auxiliary-input-source">10.2. Transient input</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="primary-squeeze-action">
   <b><a href="#primary-squeeze-action">#primary-squeeze-action</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-primary-squeeze-action">10.1. XRInputSource</a> <a href="#ref-for-primary-squeeze-action①">(2)</a> <a href="#ref-for-primary-squeeze-action②">(3)</a> <a href="#ref-for-primary-squeeze-action③">(4)</a> <a href="#ref-for-primary-squeeze-action④">(5)</a> <a href="#ref-for-primary-squeeze-action⑤">(6)</a> <a href="#ref-for-primary-squeeze-action⑥">(7)</a> <a href="#ref-for-primary-squeeze-action⑦">(8)</a> <a href="#ref-for-primary-squeeze-action⑧">(9)</a>
    <li><a href="#ref-for-primary-squeeze-action⑨">12.5. Event Types</a> <a href="#ref-for-primary-squeeze-action①⓪">(2)</a> <a href="#ref-for-primary-squeeze-action①①">(3)</a> <a href="#ref-for-primary-squeeze-action①②">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="transient-input-sources">
   <b><a href="#transient-input-sources">#transient-input-sources</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-transient-input-sources">10.1. XRInputSource</a>
    <li><a href="#ref-for-transient-input-sources①">10.2. Transient input</a> <a href="#ref-for-transient-input-sources②">(2)</a> <a href="#ref-for-transient-input-sources③">(3)</a> <a href="#ref-for-transient-input-sources④">(4)</a> <a href="#ref-for-transient-input-sources⑤">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="transient-action">
   <b><a href="#transient-action">#transient-action</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-transient-action">10.2. Transient input</a> <a href="#ref-for-transient-action①">(2)</a> <a href="#ref-for-transient-action②">(3)</a> <a href="#ref-for-transient-action③">(4)</a> <a href="#ref-for-transient-action④">(5)</a> <a href="#ref-for-transient-action⑤">(6)</a> <a href="#ref-for-transient-action⑥">(7)</a> <a href="#ref-for-transient-action⑦">(8)</a> <a href="#ref-for-transient-action⑧">(9)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="auxiliary-action">
   <b><a href="#auxiliary-action">#auxiliary-action</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-auxiliary-action">10.2. Transient input</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrinputsourcearray">
   <b><a href="#xrinputsourcearray">#xrinputsourcearray</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrinputsourcearray">4.1. XRSession</a>
    <li><a href="#ref-for-xrinputsourcearray①">10.3. XRInputSourceArray</a> <a href="#ref-for-xrinputsourcearray②">(2)</a> <a href="#ref-for-xrinputsourcearray③">(3)</a> <a href="#ref-for-xrinputsourcearray④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsourcearray-length">
   <b><a href="#dom-xrinputsourcearray-length">#dom-xrinputsourcearray-length</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsourcearray-length">10.3. XRInputSourceArray</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedefdef-xrwebglrenderingcontext">
   <b><a href="#typedefdef-xrwebglrenderingcontext">#typedefdef-xrwebglrenderingcontext</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedefdef-xrwebglrenderingcontext">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-xrwebgllayerinit">
   <b><a href="#dictdef-xrwebgllayerinit">#dictdef-xrwebgllayerinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-xrwebgllayerinit">11.1. XRWebGLLayer</a> <a href="#ref-for-dictdef-xrwebgllayerinit①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayerinit-antialias">
   <b><a href="#dom-xrwebgllayerinit-antialias">#dom-xrwebgllayerinit-antialias</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayerinit-antialias">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayerinit-depth">
   <b><a href="#dom-xrwebgllayerinit-depth">#dom-xrwebgllayerinit-depth</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayerinit-depth">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrwebgllayerinit-depth①">(2)</a> <a href="#ref-for-dom-xrwebgllayerinit-depth②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayerinit-stencil">
   <b><a href="#dom-xrwebgllayerinit-stencil">#dom-xrwebgllayerinit-stencil</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayerinit-stencil">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrwebgllayerinit-stencil①">(2)</a> <a href="#ref-for-dom-xrwebgllayerinit-stencil②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayerinit-alpha">
   <b><a href="#dom-xrwebgllayerinit-alpha">#dom-xrwebgllayerinit-alpha</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayerinit-alpha">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrwebgllayerinit-alpha①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayerinit-ignoredepthvalues">
   <b><a href="#dom-xrwebgllayerinit-ignoredepthvalues">#dom-xrwebgllayerinit-ignoredepthvalues</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayerinit-ignoredepthvalues">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrwebgllayer">
   <b><a href="#xrwebgllayer">#xrwebgllayer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrwebgllayer">4.1. XRSession</a>
    <li><a href="#ref-for-xrwebgllayer①">4.2. XRRenderState</a> <a href="#ref-for-xrwebgllayer②">(2)</a> <a href="#ref-for-xrwebgllayer③">(3)</a> <a href="#ref-for-xrwebgllayer④">(4)</a>
    <li><a href="#ref-for-xrwebgllayer⑤">7.2. XRViewport</a> <a href="#ref-for-xrwebgllayer⑥">(2)</a>
    <li><a href="#ref-for-xrwebgllayer⑦">11. Layers</a>
    <li><a href="#ref-for-xrwebgllayer⑧">11.1. XRWebGLLayer</a> <a href="#ref-for-xrwebgllayer⑨">(2)</a> <a href="#ref-for-xrwebgllayer①⓪">(3)</a> <a href="#ref-for-xrwebgllayer①①">(4)</a> <a href="#ref-for-xrwebgllayer①②">(5)</a> <a href="#ref-for-xrwebgllayer①③">(6)</a> <a href="#ref-for-xrwebgllayer①④">(7)</a> <a href="#ref-for-xrwebgllayer①⑤">(8)</a> <a href="#ref-for-xrwebgllayer①⑥">(9)</a> <a href="#ref-for-xrwebgllayer①⑦">(10)</a> <a href="#ref-for-xrwebgllayer①⑧">(11)</a> <a href="#ref-for-xrwebgllayer①⑨">(12)</a> <a href="#ref-for-xrwebgllayer②⓪">(13)</a> <a href="#ref-for-xrwebgllayer②①">(14)</a>
    <li><a href="#ref-for-xrwebgllayer②②">11.2. WebGL Context Compatibility</a> <a href="#ref-for-xrwebgllayer②③">(2)</a> <a href="#ref-for-xrwebgllayer②④">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrwebgllayer-context">
   <b><a href="#xrwebgllayer-context">#xrwebgllayer-context</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrwebgllayer-context">4.1. XRSession</a>
    <li><a href="#ref-for-xrwebgllayer-context①">11.1. XRWebGLLayer</a> <a href="#ref-for-xrwebgllayer-context②">(2)</a> <a href="#ref-for-xrwebgllayer-context③">(3)</a> <a href="#ref-for-xrwebgllayer-context④">(4)</a>
    <li><a href="#ref-for-xrwebgllayer-context⑤">13.7. Context Isolation</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrwebgllayer-session">
   <b><a href="#xrwebgllayer-session">#xrwebgllayer-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrwebgllayer-session">11.1. XRWebGLLayer</a> <a href="#ref-for-xrwebgllayer-session①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-xrwebgllayer">
   <b><a href="#dom-xrwebgllayer-xrwebgllayer">#dom-xrwebgllayer-xrwebgllayer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-xrwebgllayer">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-context">
   <b><a href="#dom-xrwebgllayer-context">#dom-xrwebgllayer-context</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-context">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrwebgllayer-context①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrwebgllayer-composition-disabled">
   <b><a href="#xrwebgllayer-composition-disabled">#xrwebgllayer-composition-disabled</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrwebgllayer-composition-disabled">4.1. XRSession</a>
    <li><a href="#ref-for-xrwebgllayer-composition-disabled①">11.1. XRWebGLLayer</a> <a href="#ref-for-xrwebgllayer-composition-disabled②">(2)</a> <a href="#ref-for-xrwebgllayer-composition-disabled③">(3)</a> <a href="#ref-for-xrwebgllayer-composition-disabled④">(4)</a> <a href="#ref-for-xrwebgllayer-composition-disabled⑤">(5)</a> <a href="#ref-for-xrwebgllayer-composition-disabled⑥">(6)</a> <a href="#ref-for-xrwebgllayer-composition-disabled⑦">(7)</a> <a href="#ref-for-xrwebgllayer-composition-disabled⑧">(8)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-framebuffer">
   <b><a href="#dom-xrwebgllayer-framebuffer">#dom-xrwebgllayer-framebuffer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-framebuffer">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrwebgllayer-framebuffer①">(2)</a> <a href="#ref-for-dom-xrwebgllayer-framebuffer②">(3)</a> <a href="#ref-for-dom-xrwebgllayer-framebuffer③">(4)</a> <a href="#ref-for-dom-xrwebgllayer-framebuffer④">(5)</a> <a href="#ref-for-dom-xrwebgllayer-framebuffer⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="opaque-framebuffer">
   <b><a href="#opaque-framebuffer">#opaque-framebuffer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-opaque-framebuffer">11.1. XRWebGLLayer</a> <a href="#ref-for-opaque-framebuffer①">(2)</a> <a href="#ref-for-opaque-framebuffer②">(3)</a> <a href="#ref-for-opaque-framebuffer③">(4)</a> <a href="#ref-for-opaque-framebuffer④">(5)</a> <a href="#ref-for-opaque-framebuffer⑤">(6)</a> <a href="#ref-for-opaque-framebuffer⑥">(7)</a> <a href="#ref-for-opaque-framebuffer⑦">(8)</a> <a href="#ref-for-opaque-framebuffer⑧">(9)</a> <a href="#ref-for-opaque-framebuffer⑨">(10)</a> <a href="#ref-for-opaque-framebuffer①⓪">(11)</a> <a href="#ref-for-opaque-framebuffer①①">(12)</a> <a href="#ref-for-opaque-framebuffer①②">(13)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrwebgllayer-target-framebuffer">
   <b><a href="#xrwebgllayer-target-framebuffer">#xrwebgllayer-target-framebuffer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrwebgllayer-target-framebuffer">11.1. XRWebGLLayer</a> <a href="#ref-for-xrwebgllayer-target-framebuffer①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-framebufferwidth">
   <b><a href="#dom-xrwebgllayer-framebufferwidth">#dom-xrwebgllayer-framebufferwidth</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-framebufferwidth">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-framebufferheight">
   <b><a href="#dom-xrwebgllayer-framebufferheight">#dom-xrwebgllayer-framebufferheight</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-framebufferheight">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-antialias">
   <b><a href="#dom-xrwebgllayer-antialias">#dom-xrwebgllayer-antialias</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-antialias">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrwebgllayer-antialias①">(2)</a> <a href="#ref-for-dom-xrwebgllayer-antialias②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-ignoredepthvalues">
   <b><a href="#dom-xrwebgllayer-ignoredepthvalues">#dom-xrwebgllayer-ignoredepthvalues</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-ignoredepthvalues">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrwebgllayer-ignoredepthvalues①">(2)</a> <a href="#ref-for-dom-xrwebgllayer-ignoredepthvalues②">(3)</a> <a href="#ref-for-dom-xrwebgllayer-ignoredepthvalues③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="list-of-viewports">
   <b><a href="#list-of-viewports">#list-of-viewports</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-of-viewports">11.1. XRWebGLLayer</a> <a href="#ref-for-list-of-viewports①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-getviewport">
   <b><a href="#dom-xrwebgllayer-getviewport">#dom-xrwebgllayer-getviewport</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-getviewport">11.1. XRWebGLLayer</a> <a href="#ref-for-dom-xrwebgllayer-getviewport①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="native-webgl-framebuffer-resolution">
   <b><a href="#native-webgl-framebuffer-resolution">#native-webgl-framebuffer-resolution</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-native-webgl-framebuffer-resolution">11.1. XRWebGLLayer</a> <a href="#ref-for-native-webgl-framebuffer-resolution①">(2)</a> <a href="#ref-for-native-webgl-framebuffer-resolution②">(3)</a> <a href="#ref-for-native-webgl-framebuffer-resolution③">(4)</a> <a href="#ref-for-native-webgl-framebuffer-resolution④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="recommended-webgl-framebuffer-resolution">
   <b><a href="#recommended-webgl-framebuffer-resolution">#recommended-webgl-framebuffer-resolution</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-recommended-webgl-framebuffer-resolution">11.1. XRWebGLLayer</a> <a href="#ref-for-recommended-webgl-framebuffer-resolution①">(2)</a> <a href="#ref-for-recommended-webgl-framebuffer-resolution②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrwebgllayer-getnativeframebufferscalefactor">
   <b><a href="#dom-xrwebgllayer-getnativeframebufferscalefactor">#dom-xrwebgllayer-getnativeframebufferscalefactor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrwebgllayer-getnativeframebufferscalefactor">11.1. XRWebGLLayer</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="compatible-graphics-adapter">
   <b><a href="#compatible-graphics-adapter">#compatible-graphics-adapter</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-compatible-graphics-adapter">11.2. WebGL Context Compatibility</a> <a href="#ref-for-compatible-graphics-adapter①">(2)</a> <a href="#ref-for-compatible-graphics-adapter②">(3)</a> <a href="#ref-for-compatible-graphics-adapter③">(4)</a> <a href="#ref-for-compatible-graphics-adapter④">(5)</a> <a href="#ref-for-compatible-graphics-adapter⑤">(6)</a> <a href="#ref-for-compatible-graphics-adapter⑥">(7)</a> <a href="#ref-for-compatible-graphics-adapter⑦">(8)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-webglcontextattributes-xrcompatible">
   <b><a href="#dom-webglcontextattributes-xrcompatible">#dom-webglcontextattributes-xrcompatible</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-webglcontextattributes-xrcompatible">11.2. WebGL Context Compatibility</a> <a href="#ref-for-dom-webglcontextattributes-xrcompatible①">(2)</a> <a href="#ref-for-dom-webglcontextattributes-xrcompatible②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xr-compatible">
   <b><a href="#xr-compatible">#xr-compatible</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xr-compatible">3.2. XR</a>
    <li><a href="#ref-for-xr-compatible①">11.1. XRWebGLLayer</a>
    <li><a href="#ref-for-xr-compatible②">11.2. WebGL Context Compatibility</a> <a href="#ref-for-xr-compatible③">(2)</a> <a href="#ref-for-xr-compatible④">(3)</a> <a href="#ref-for-xr-compatible⑤">(4)</a> <a href="#ref-for-xr-compatible⑥">(5)</a> <a href="#ref-for-xr-compatible⑦">(6)</a> <a href="#ref-for-xr-compatible⑧">(7)</a> <a href="#ref-for-xr-compatible⑨">(8)</a> <a href="#ref-for-xr-compatible①⓪">(9)</a> <a href="#ref-for-xr-compatible①①">(10)</a> <a href="#ref-for-xr-compatible①②">(11)</a> <a href="#ref-for-xr-compatible①③">(12)</a> <a href="#ref-for-xr-compatible①④">(13)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-webglrenderingcontextbase-makexrcompatible">
   <b><a href="#dom-webglrenderingcontextbase-makexrcompatible">#dom-webglrenderingcontextbase-makexrcompatible</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-webglrenderingcontextbase-makexrcompatible">11.2. WebGL Context Compatibility</a> <a href="#ref-for-dom-webglrenderingcontextbase-makexrcompatible①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsessionevent">
   <b><a href="#xrsessionevent">#xrsessionevent</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsessionevent">4.1. XRSession</a>
    <li><a href="#ref-for-xrsessionevent①">12.1. XRSessionEvent</a>
    <li><a href="#ref-for-xrsessionevent②">12.5. Event Types</a> <a href="#ref-for-xrsessionevent③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-xrsessioneventinit">
   <b><a href="#dictdef-xrsessioneventinit">#dictdef-xrsessioneventinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-xrsessioneventinit">12.1. XRSessionEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrsessionevent-session">
   <b><a href="#dom-xrsessionevent-session">#dom-xrsessionevent-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrsessionevent-session">12.1. XRSessionEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrinputsourceevent">
   <b><a href="#xrinputsourceevent">#xrinputsourceevent</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrinputsourceevent">10.1. XRInputSource</a> <a href="#ref-for-xrinputsourceevent①">(2)</a>
    <li><a href="#ref-for-xrinputsourceevent②">12.2. XRInputSourceEvent</a> <a href="#ref-for-xrinputsourceevent③">(2)</a>
    <li><a href="#ref-for-xrinputsourceevent④">12.5. Event Types</a> <a href="#ref-for-xrinputsourceevent⑤">(2)</a> <a href="#ref-for-xrinputsourceevent⑥">(3)</a> <a href="#ref-for-xrinputsourceevent⑦">(4)</a> <a href="#ref-for-xrinputsourceevent⑧">(5)</a> <a href="#ref-for-xrinputsourceevent⑨">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-xrinputsourceeventinit">
   <b><a href="#dictdef-xrinputsourceeventinit">#dictdef-xrinputsourceeventinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-xrinputsourceeventinit">12.2. XRInputSourceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsourceevent-inputsource">
   <b><a href="#dom-xrinputsourceevent-inputsource">#dom-xrinputsourceevent-inputsource</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsourceevent-inputsource">12.2. XRInputSourceEvent</a> <a href="#ref-for-dom-xrinputsourceevent-inputsource①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsourceevent-frame">
   <b><a href="#dom-xrinputsourceevent-frame">#dom-xrinputsourceevent-frame</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsourceevent-frame">12.2. XRInputSourceEvent</a> <a href="#ref-for-dom-xrinputsourceevent-frame①">(2)</a> <a href="#ref-for-dom-xrinputsourceevent-frame②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="fire-an-input-source-event">
   <b><a href="#fire-an-input-source-event">#fire-an-input-source-event</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-fire-an-input-source-event">10.1. XRInputSource</a> <a href="#ref-for-fire-an-input-source-event①">(2)</a> <a href="#ref-for-fire-an-input-source-event②">(3)</a> <a href="#ref-for-fire-an-input-source-event③">(4)</a> <a href="#ref-for-fire-an-input-source-event④">(5)</a> <a href="#ref-for-fire-an-input-source-event⑤">(6)</a> <a href="#ref-for-fire-an-input-source-event⑥">(7)</a> <a href="#ref-for-fire-an-input-source-event⑦">(8)</a>
    <li><a href="#ref-for-fire-an-input-source-event⑧">10.2. Transient input</a> <a href="#ref-for-fire-an-input-source-event⑨">(2)</a> <a href="#ref-for-fire-an-input-source-event①⓪">(3)</a> <a href="#ref-for-fire-an-input-source-event①①">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrinputsourceschangeevent">
   <b><a href="#xrinputsourceschangeevent">#xrinputsourceschangeevent</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrinputsourceschangeevent">4.1. XRSession</a> <a href="#ref-for-xrinputsourceschangeevent①">(2)</a> <a href="#ref-for-xrinputsourceschangeevent②">(3)</a>
    <li><a href="#ref-for-xrinputsourceschangeevent③">12.3. XRInputSourcesChangeEvent</a>
    <li><a href="#ref-for-xrinputsourceschangeevent④">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-xrinputsourceschangeeventinit">
   <b><a href="#dictdef-xrinputsourceschangeeventinit">#dictdef-xrinputsourceschangeeventinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-xrinputsourceschangeeventinit">12.3. XRInputSourcesChangeEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsourceschangeevent-session">
   <b><a href="#dom-xrinputsourceschangeevent-session">#dom-xrinputsourceschangeevent-session</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsourceschangeevent-session">12.3. XRInputSourcesChangeEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsourceschangeevent-added">
   <b><a href="#dom-xrinputsourceschangeevent-added">#dom-xrinputsourceschangeevent-added</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsourceschangeevent-added">4.1. XRSession</a> <a href="#ref-for-dom-xrinputsourceschangeevent-added①">(2)</a>
    <li><a href="#ref-for-dom-xrinputsourceschangeevent-added②">12.3. XRInputSourcesChangeEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrinputsourceschangeevent-removed">
   <b><a href="#dom-xrinputsourceschangeevent-removed">#dom-xrinputsourceschangeevent-removed</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrinputsourceschangeevent-removed">4.1. XRSession</a> <a href="#ref-for-dom-xrinputsourceschangeevent-removed①">(2)</a>
    <li><a href="#ref-for-dom-xrinputsourceschangeevent-removed②">12.3. XRInputSourcesChangeEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrreferencespaceevent">
   <b><a href="#xrreferencespaceevent">#xrreferencespaceevent</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrreferencespaceevent">12.4. XRReferenceSpaceEvent</a>
    <li><a href="#ref-for-xrreferencespaceevent①">12.5. Event Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-xrreferencespaceeventinit">
   <b><a href="#dictdef-xrreferencespaceeventinit">#dictdef-xrreferencespaceeventinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-xrreferencespaceeventinit">12.4. XRReferenceSpaceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespaceevent-referencespace">
   <b><a href="#dom-xrreferencespaceevent-referencespace">#dom-xrreferencespaceevent-referencespace</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespaceevent-referencespace">12.4. XRReferenceSpaceEvent</a> <a href="#ref-for-dom-xrreferencespaceevent-referencespace①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrreferencespaceevent-transform">
   <b><a href="#dom-xrreferencespaceevent-transform">#dom-xrreferencespaceevent-transform</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrreferencespaceevent-transform">12.4. XRReferenceSpaceEvent</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xr-devicechange">
   <b><a href="#eventdef-xr-devicechange">#eventdef-xr-devicechange</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xr-devicechange">3.2. XR</a> <a href="#ref-for-eventdef-xr-devicechange①">(2)</a>
    <li><a href="#ref-for-eventdef-xr-devicechange②">14.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-visibilitychange">
   <b><a href="#eventdef-xrsession-visibilitychange">#eventdef-xrsession-visibilitychange</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-visibilitychange">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-end">
   <b><a href="#eventdef-xrsession-end">#eventdef-xrsession-end</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-end">4.1. XRSession</a> <a href="#ref-for-eventdef-xrsession-end①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-inputsourceschange">
   <b><a href="#eventdef-xrsession-inputsourceschange">#eventdef-xrsession-inputsourceschange</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-inputsourceschange">4.1. XRSession</a> <a href="#ref-for-eventdef-xrsession-inputsourceschange①">(2)</a> <a href="#ref-for-eventdef-xrsession-inputsourceschange②">(3)</a> <a href="#ref-for-eventdef-xrsession-inputsourceschange③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-selectstart">
   <b><a href="#eventdef-xrsession-selectstart">#eventdef-xrsession-selectstart</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-selectstart">4.1. XRSession</a>
    <li><a href="#ref-for-eventdef-xrsession-selectstart①">10.1. XRInputSource</a> <a href="#ref-for-eventdef-xrsession-selectstart②">(2)</a>
    <li><a href="#ref-for-eventdef-xrsession-selectstart③">10.2. Transient input</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-selectend">
   <b><a href="#eventdef-xrsession-selectend">#eventdef-xrsession-selectend</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-selectend">4.1. XRSession</a>
    <li><a href="#ref-for-eventdef-xrsession-selectend①">10.1. XRInputSource</a> <a href="#ref-for-eventdef-xrsession-selectend②">(2)</a> <a href="#ref-for-eventdef-xrsession-selectend③">(3)</a>
    <li><a href="#ref-for-eventdef-xrsession-selectend④">10.2. Transient input</a> <a href="#ref-for-eventdef-xrsession-selectend⑤">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-select">
   <b><a href="#eventdef-xrsession-select">#eventdef-xrsession-select</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-select">4.1. XRSession</a>
    <li><a href="#ref-for-eventdef-xrsession-select①">5.1. XRFrame</a>
    <li><a href="#ref-for-eventdef-xrsession-select②">10.1. XRInputSource</a> <a href="#ref-for-eventdef-xrsession-select③">(2)</a>
    <li><a href="#ref-for-eventdef-xrsession-select④">10.2. Transient input</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-squeezestart">
   <b><a href="#eventdef-xrsession-squeezestart">#eventdef-xrsession-squeezestart</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-squeezestart">4.1. XRSession</a>
    <li><a href="#ref-for-eventdef-xrsession-squeezestart①">10.1. XRInputSource</a> <a href="#ref-for-eventdef-xrsession-squeezestart②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-squeezeend">
   <b><a href="#eventdef-xrsession-squeezeend">#eventdef-xrsession-squeezeend</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-squeezeend">4.1. XRSession</a>
    <li><a href="#ref-for-eventdef-xrsession-squeezeend①">10.1. XRInputSource</a> <a href="#ref-for-eventdef-xrsession-squeezeend②">(2)</a> <a href="#ref-for-eventdef-xrsession-squeezeend③">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrsession-squeeze">
   <b><a href="#eventdef-xrsession-squeeze">#eventdef-xrsession-squeeze</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrsession-squeeze">4.1. XRSession</a>
    <li><a href="#ref-for-eventdef-xrsession-squeeze①">10.1. XRInputSource</a> <a href="#ref-for-eventdef-xrsession-squeeze②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="eventdef-xrreferencespace-reset">
   <b><a href="#eventdef-xrreferencespace-reset">#eventdef-xrreferencespace-reset</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventdef-xrreferencespace-reset">6.2. XRReferenceSpace</a>
    <li><a href="#ref-for-eventdef-xrreferencespace-reset①">12.5. Event Types</a> <a href="#ref-for-eventdef-xrreferencespace-reset②">(2)</a> <a href="#ref-for-eventdef-xrreferencespace-reset③">(3)</a> <a href="#ref-for-eventdef-xrreferencespace-reset④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="sensitive-information">
   <b><a href="#sensitive-information">#sensitive-information</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-sensitive-information">3.4. Feature Dependencies</a> <a href="#ref-for-sensitive-information①">(2)</a>
    <li><a href="#ref-for-sensitive-information②">13.1.1. Active and focused document</a>
    <li><a href="#ref-for-sensitive-information③">13.1.2. Trustworthy documents and origins</a>
    <li><a href="#ref-for-sensitive-information④">13.2.3. Implicit and Explicit consent</a>
    <li><a href="#ref-for-sensitive-information⑤">13.2.4. Duration of consent</a>
    <li><a href="#ref-for-sensitive-information⑥">13.4.1. Throttling</a>
    <li><a href="#ref-for-sensitive-information⑦">13.5. Protected functionality</a>
    <li><a href="#ref-for-sensitive-information⑧">13.5.2. Poses</a> <a href="#ref-for-sensitive-information⑨">(2)</a>
    <li><a href="#ref-for-sensitive-information①⓪">13.5.3. Reference spaces</a> <a href="#ref-for-sensitive-information①①">(2)</a>
    <li><a href="#ref-for-sensitive-information①②">13.8. Fingerprinting</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="active-and-focused">
   <b><a href="#active-and-focused">#active-and-focused</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-active-and-focused">13.1.1. Active and focused document</a>
    <li><a href="#ref-for-active-and-focused①">13.1.2. Trustworthy documents and origins</a>
    <li><a href="#ref-for-active-and-focused②">13.5.2. Poses</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="trustworthy">
   <b><a href="#trustworthy">#trustworthy</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-trustworthy">13.1.2. Trustworthy documents and origins</a>
    <li><a href="#ref-for-trustworthy①">13.5.1. Immersiveness</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="user-intent">
   <b><a href="#user-intent">#user-intent</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-user-intent">3.4. Feature Dependencies</a> <a href="#ref-for-user-intent①">(2)</a> <a href="#ref-for-user-intent②">(3)</a> <a href="#ref-for-user-intent③">(4)</a> <a href="#ref-for-user-intent④">(5)</a> <a href="#ref-for-user-intent⑤">(6)</a> <a href="#ref-for-user-intent⑥">(7)</a> <a href="#ref-for-user-intent⑦">(8)</a>
    <li><a href="#ref-for-user-intent⑧">13.2.1. User activation</a>
    <li><a href="#ref-for-user-intent⑨">13.2.2. Launching a web application</a>
    <li><a href="#ref-for-user-intent①⓪">13.2.4. Duration of consent</a>
    <li><a href="#ref-for-user-intent①①">13.4. Data adjustments</a>
    <li><a href="#ref-for-user-intent①②">13.5.1. Immersiveness</a>
    <li><a href="#ref-for-user-intent①③">13.5.2. Poses</a>
    <li><a href="#ref-for-user-intent①④">13.5.3. Reference spaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="launching-a-web-application">
   <b><a href="#launching-a-web-application">#launching-a-web-application</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-launching-a-web-application">13.5.1. Immersiveness</a> <a href="#ref-for-launching-a-web-application①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="implicit-consent">
   <b><a href="#implicit-consent">#implicit-consent</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-implicit-consent">3.4. Feature Dependencies</a> <a href="#ref-for-implicit-consent①">(2)</a>
    <li><a href="#ref-for-implicit-consent②">13.5.1. Immersiveness</a>
    <li><a href="#ref-for-implicit-consent③">13.5.2. Poses</a>
    <li><a href="#ref-for-implicit-consent④">13.5.3. Reference spaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="explicit-consent">
   <b><a href="#explicit-consent">#explicit-consent</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-explicit-consent">3.4. Feature Dependencies</a> <a href="#ref-for-explicit-consent①">(2)</a> <a href="#ref-for-explicit-consent②">(3)</a> <a href="#ref-for-explicit-consent③">(4)</a> <a href="#ref-for-explicit-consent④">(5)</a>
    <li><a href="#ref-for-explicit-consent⑤">13.2.4. Duration of consent</a>
    <li><a href="#ref-for-explicit-consent⑥">13.3. Mid-session consent</a> <a href="#ref-for-explicit-consent⑦">(2)</a>
    <li><a href="#ref-for-explicit-consent⑧">13.5.1. Immersiveness</a>
    <li><a href="#ref-for-explicit-consent⑨">13.5.2. Poses</a> <a href="#ref-for-explicit-consent①⓪">(2)</a>
    <li><a href="#ref-for-explicit-consent①①">13.5.3. Reference spaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="data-adjustment">
   <b><a href="#data-adjustment">#data-adjustment</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-data-adjustment">13.4. Data adjustments</a>
    <li><a href="#ref-for-data-adjustment①">13.5.2. Poses</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="throttling">
   <b><a href="#throttling">#throttling</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-throttling">4.1. XRSession</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="rounding">
   <b><a href="#rounding">#rounding</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-rounding">6.2. XRReferenceSpace</a> <a href="#ref-for-rounding①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="quantization">
   <b><a href="#quantization">#quantization</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-quantization">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-quantization①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="limiting">
   <b><a href="#limiting">#limiting</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-limiting">6.3. XRBoundedReferenceSpace</a> <a href="#ref-for-limiting①">(2)</a>
    <li><a href="#ref-for-limiting②">13.5.3. Reference spaces</a> <a href="#ref-for-limiting③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="immersive-session-request-is-allowed">
   <b><a href="#immersive-session-request-is-allowed">#immersive-session-request-is-allowed</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-immersive-session-request-is-allowed">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="inline-session-request-is-allowed">
   <b><a href="#inline-session-request-is-allowed">#inline-session-request-is-allowed</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-inline-session-request-is-allowed">3.2. XR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="poses-may-be-reported">
   <b><a href="#poses-may-be-reported">#poses-may-be-reported</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-poses-may-be-reported">6.1. XRSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="poses-must-be-limited">
   <b><a href="#poses-must-be-limited">#poses-must-be-limited</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-poses-must-be-limited">6.1. XRSpace</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="trusted-ui">
   <b><a href="#trusted-ui">#trusted-ui</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-trusted-ui">13.6. Trusted Environment</a> <a href="#ref-for-trusted-ui①">(2)</a> <a href="#ref-for-trusted-ui②">(3)</a> <a href="#ref-for-trusted-ui③">(4)</a> <a href="#ref-for-trusted-ui④">(5)</a> <a href="#ref-for-trusted-ui⑤">(6)</a> <a href="#ref-for-trusted-ui⑥">(7)</a> <a href="#ref-for-trusted-ui⑦">(8)</a> <a href="#ref-for-trusted-ui⑧">(9)</a> <a href="#ref-for-trusted-ui⑨">(10)</a> <a href="#ref-for-trusted-ui①⓪">(11)</a> <a href="#ref-for-trusted-ui①①">(12)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="trusted-immersive-ui">
   <b><a href="#trusted-immersive-ui">#trusted-immersive-ui</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-trusted-immersive-ui">13.6. Trusted Environment</a> <a href="#ref-for-trusted-immersive-ui①">(2)</a> <a href="#ref-for-trusted-immersive-ui②">(3)</a>
   </ul>
  </aside>
<script>/* script-var-click-highlighting */

    document.addEventListener("click", e=>{
        if(e.target.nodeName == "VAR") {
            highlightSameAlgoVars(e.target);
        }
    });
    {
        const indexCounts = new Map();
        const indexNames = new Map();
        function highlightSameAlgoVars(v) {
            // Find the algorithm container.
            let algoContainer = null;
            let searchEl = v;
            while(algoContainer == null && searchEl != document.body) {
                searchEl = searchEl.parentNode;
                if(searchEl.hasAttribute("data-algorithm")) {
                    algoContainer = searchEl;
                }
            }

            // Not highlighting document-global vars,
            // too likely to be unrelated.
            if(algoContainer == null) return;

            const algoName = algoContainer.getAttribute("data-algorithm");
            const varName = getVarName(v);
            const addClass = !v.classList.contains("selected");
            let highlightClass = null;
            if(addClass) {
                const index = chooseHighlightIndex(algoName, varName);
                indexCounts.get(algoName)[index] += 1;
                indexNames.set(algoName+"///"+varName, index);
                highlightClass = nameFromIndex(index);
            } else {
                const index = previousHighlightIndex(algoName, varName);
                indexCounts.get(algoName)[index] -= 1;
                highlightClass = nameFromIndex(index);
            }

            // Find all same-name vars, and toggle their class appropriately.
            for(const el of algoContainer.querySelectorAll("var")) {
                if(getVarName(el) == varName) {
                    el.classList.toggle("selected", addClass);
                    el.classList.toggle(highlightClass, addClass);
                }
            }
        }
        function getVarName(el) {
            return el.textContent.replace(/(\s| )+/, " ").trim();
        }
        function chooseHighlightIndex(algoName, varName) {
            let indexes = null;
            if(indexCounts.has(algoName)) {
                indexes = indexCounts.get(algoName);
            } else {
                // 7 classes right now
                indexes = [0,0,0,0,0,0,0];
                indexCounts.set(algoName, indexes);
            }

            // If the element was recently unclicked,
            // *and* that color is still unclaimed,
            // give it back the same color.
            const lastIndex = previousHighlightIndex(algoName, varName);
            if(indexes[lastIndex] === 0) return lastIndex;

            // Find the earliest index with the lowest count.
            const minCount = Math.min.apply(null, indexes);
            let index = null;
            for(var i = 0; i < indexes.length; i++) {
                if(indexes[i] == minCount) {
                    return i;
                }
            }
        }
        function previousHighlightIndex(algoName, varName) {
            return indexNames.get(algoName+"///"+varName);
        }
        function nameFromIndex(index) {
            return "selected" + index;
        }
    }
    </script>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>